-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy patheslint.config.mjs
54 lines (52 loc) · 1.37 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import eslintPluginPrettier from "eslint-plugin-prettier";
import prettierConfig from "eslint-config-prettier";
import json from "@eslint/json";
import markdown from "@eslint/markdown";
const ignores = ["**/node_modules", "**/dist", "**/docs", ".github", ".husky", ".vscode", "**/public", "**/coverage", "packages/e2e/playwright-report"];
export default [
{
ignores
},
{
files: ["**/*.json"],
language: "json/json",
plugins: {
json,
}
},
{
files: ["**/*.md"],
plugins: {
markdown
},
language: "markdown/commonmark",
},
{
name: "prettier", // Configuration name
files: ["**/*.{js,jsx,ts,tsx,json,md,yml,yaml,html,css}"],
ignores: ['**.json'],
plugins: {
prettier: eslintPluginPrettier, // Include Prettier plugin
},
rules: {
...prettierConfig.rules, // Disable ESLint rules that conflict with Prettier
},
},
{
name: "typescript", // Configuration name
files: ["**/*.ts"], // TypeScript-specific configuration
plugins: {
"@typescript-eslint": typescriptEslint, // Include TypeScript ESLint plugin
},
languageOptions: {
parser: tsParser,
},
rules: {
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"no-console": process.env.CI ? "error" : "warn",
},
},
];