-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (49 loc) · 1.58 KB
/
Copy patheslint.config.js
File metadata and controls
52 lines (49 loc) · 1.58 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
export default [
// ...js.configs.recommended etc above...
{
files: ["src/**/*.{ts,tsx,js,jsx}"],
ignores: [
"build/",
"node_modules/",
"src/App.test.tsx",
"src/pages/UIKit.tsx",
],
languageOptions: {
parser: (await import("@typescript-eslint/parser")).default,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
globals: {
process: "readonly",
},
},
plugins: {
"@typescript-eslint": (await import("@typescript-eslint/eslint-plugin")).default,
react: (await import("eslint-plugin-react")).default,
"react-hooks": (await import("eslint-plugin-react-hooks")).default,
},
rules: {
// Let Prettier handle formatting; keep ESLint for logic issues.
indent: "off",
quotes: "off",
semi: "off",
// TS/React basics
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
settings: {
react: {
version: "detect",
},
},
},
];