forked from phork/phorkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
executable file
·169 lines (169 loc) · 4.58 KB
/
.eslintrc.json
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"extends": [
"prettier",
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"configFile": "./.babelrc.json"
}
},
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"plugins": ["react", "prettier", "json", "react-hooks", "jsx-a11y", "import", "jest"],
"rules": {
"arrow-parens": 0,
"camelcase": 2,
"import/newline-after-import": ["error", { "count": 1 }],
"import/no-absolute-path": 2,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": 0,
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]]
}
],
"no-console": 1,
"no-void": 0,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": 2,
"react/display-name": 0,
"react/forbid-prop-types": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-no-undef": "error",
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": false,
"shorthandFirst":true,
"shorthandLast": false,
"ignoreCase": false,
"noSortAlphabetically": false,
"reservedFirst": false
}
],
"jsx-a11y/anchor-is-valid": ["error", { "components": ["Link"], "specialLink": ["onClick", "to"] }],
"no-unused-vars": ["error", { "ignoreRestSiblings": true }]
},
"globals": {
"document": true,
"window": true
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
},
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": "**/*.mdx",
"extends":[
"prettier",
"eslint:recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:mdx/recommended"
],
"rules": {
"no-console": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/prop-types": 0
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": [
"prettier",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint", "react", "prettier", "json", "react-hooks", "jsx-a11y", "import"],
"rules": {
"arrow-parens": 0,
"camelcase": 2,
"import/newline-after-import": ["error", { "count": 1 }],
"import/no-absolute-path": 2,
"import/no-named-as-default": 0,
"import/no-named-as-default-member": 0,
"import/prefer-default-export": 0,
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]]
}
],
"no-console": 1,
"no-void": 0,
"react-hooks/rules-of-hooks": 2,
"react-hooks/exhaustive-deps": 2,
"react/display-name": 0,
"react/prop-types": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-no-undef": 2,
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": false,
"shorthandFirst":true,
"shorthandLast": false,
"ignoreCase": false,
"noSortAlphabetically": false,
"reservedFirst": false
}
],
"jsx-a11y/anchor-is-valid": ["error", { "components": ["Link"], "specialLink": ["onClick", "to"] }],
"@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }],
"@typescript-eslint/no-loss-of-precision": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
},
{
"files": ["**/stories/*"],
"rules": {
"no-console": 0
}
}
]
}