-
-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy patheslint.config.mjs
More file actions
79 lines (77 loc) · 1.82 KB
/
Copy patheslint.config.mjs
File metadata and controls
79 lines (77 loc) · 1.82 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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 = [
"packages/storybook/.storybook/manager-head.html",
"packages/storybook/storybook-static/",
"packages/storybook/dist/",
"packages/storybook/node_modules/",
"**/node_modules",
"**/dist",
"**/docs",
".github",
".husky",
".vscode",
"**/public",
"**/coverage",
"packages/e2e/playwright-report",
"packages/e2e/index.html" // Ignore Vite root HTML file
];
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-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
ignoreRestSiblings: true,
}
],
"no-console": process.env.CI ? "error" : "warn",
},
},
];