-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy path.eslintrc.json
More file actions
95 lines (95 loc) · 2.25 KB
/
.eslintrc.json
File metadata and controls
95 lines (95 loc) · 2.25 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"plugins": ["@typescript-eslint", "prettier", "react"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier"
],
"rules": {
"prettier/prettier": ["error", { "trailingComma": "es5", "semi": false }],
"no-cond-assign": "warn",
"no-console": "warn",
"no-constant-condition": "error",
"no-debugger": "error",
"no-empty": "error",
"eqeqeq": ["error", "smart"],
"no-eval": "error",
"no-implied-eval": "error",
"no-throw-literal": "error",
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "warn",
"linebreak-style": ["error", "unix"],
"max-depth": ["warn", 4],
"max-params": ["warn", 3],
"new-cap": "error",
"no-bitwise": "error",
"no-var": "error",
"prefer-const": "warn",
"prefer-spread": "warn",
"prefer-template": "warn",
"react/react-in-jsx-scope": "warn",
"react/prop-types": "off",
"react/sort-comp": [
"warn",
{
"order": [
"lifecycle",
"everything-else",
"/^handle.+$/",
"/^get.+$/",
"/^render.+$/",
"render"
]
}
],
"react/jsx-key": "error",
"react/jsx-no-bind": [
"error",
{
"allowArrowFunctions": true
}
],
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-undef": "error",
"react/jsx-uses-vars": "error",
"react/jsx-pascal-case": "error",
"react/no-multi-comp": "off",
"react/prefer-es6-class": ["error", "always"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"env": {
"es6": true,
"browser": true,
"node": true
}
}