-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
68 lines (66 loc) · 2.03 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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"airbnb",
"plugin:react/jsx-runtime",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "react-hooks", "import", "prettier"],
"globals": {
"React": "readonly"
},
"rules": {
"prettier/prettier": "error",
"import/no-unresolved": [0],
"arrow-body-style": "off",
"import/extensions": [0],
"import/prefer-default-export": [0],
"no-unused-vars": [0],
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"no-unused-expressions": ["error", { "allowTernary": true }],
"no-shadow": [0],
"no-param-reassign": "off",
// --- typescript rules ---
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/ban-ts-ignore": "off",
// --- react rules ---
"react/prop-types": [0],
"react/no-array-index-key": "off",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", "ts", "tsx"] }],
"react/function-component-definition": [2, { "namedComponents": "arrow-function" }],
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }],
"react/button-has-type": [0],
"react/require-default-props": [0],
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"react/jsx-props-no-spreading": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
"required": {
"some": ["nesting", "id"]
}
}
],
"react/destructuring-assignment": "off"
}
}