-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
72 lines (71 loc) · 2.04 KB
/
.eslintrc.js
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
module.exports = {
extends: [
"airbnb",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
plugins: ["import", "@typescript-eslint", "react-hooks"],
parserOptions: {
ecmaFeatures: {
jsx: true
},
sourceType: "module",
useJSXTextNode: true,
project: "./tsconfig.json"
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"import/extensions": [1, "never", { ts: "never", "json": "always" }],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"indent": ["error", 4],
"react/jsx-props-no-spreading": "off",
"quotes": ["error", "double"],
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "never"],
"react/jsx-filename-extension": ['warn', {
extensions: ['ts', '.tsx'],
}
],
"react/sort-comp": [1, {
"order": [
"constructor",
"lifecycle",
"everything-else",
"render"
]
}]
},
overrides: [
{
files: ["**/*.ts", "**/*.tsx"],
rules: {
"no-unused-vars": ["off"],
"semi": 1,
"quote-props": ["error", "as-needed"]
}
}
],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"]
},
"eslint-import-resolver-typescript": true
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
react: {
version: "detect"
}
},
env: {
jest: true,
browser: true
}
};