Repository navigation
Expand file tree
/
Copy path.eslintrc
More file actions
99 lines (99 loc) · 2.18 KB
/
Copy path.eslintrc
File metadata and controls
99 lines (99 loc) · 2.18 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"ignorePatterns": ["public", ".cache", "node_modules", "src/libs"],
"rules": {
"strict": 0,
"no-console": 1,
"simple-import-sort/imports": [
2,
{
"groups": [
["^react$", "^prop-types$"],
[
"^gatsby",
"^@mdx",
"^styled-components$",
"^grommet",
"^@components",
"^@templates"
],
["^\\.", "^"]
]
}
],
"sort-imports": 0,
"import/order": 0,
// TypeScript specific rules
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
// Disable rules that conflict with TypeScript
"react/prop-types": 0,
"react/require-default-props": 0,
"no-unused-vars": 0,
"no-shadow": 0,
"@typescript-eslint/no-shadow": ["error"],
// Import extensions for TypeScript
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"extends": [
"airbnb",
"eslint:recommended",
"plugin:react/recommended",
"plugin:markdown/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": {},
"alias": [["@components", "./src/components"]]
}
},
"plugins": [
"simple-import-sort",
"@typescript-eslint",
"import"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off" // TypeScript handles this
}
}
]
}