-
Notifications
You must be signed in to change notification settings - Fork 38
/
.eslintrc
111 lines (111 loc) · 2.78 KB
/
.eslintrc
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
{
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["react", "react-hooks", "simple-import-sort"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/ban-types": 1,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-function": 0,
"eqeqeq": [2, "smart"],
"no-array-constructor": 2,
"no-bitwise": 2,
"no-cond-assign": 2,
"no-console": [
2,
{
"allow": ["warn", "error"]
}
],
"no-constant-condition": 2,
"no-eval": 2,
"no-implied-eval": 2,
"no-lonely-if": 2,
"no-unsafe-negation": 2,
"no-nested-ternary": 2,
"react/jsx-no-bind": [
2,
{
"ignoreDOMComponents": true,
"ignoreRefs": true
}
],
"react/prop-types": 1,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": [
"error",
{
"additionalHooks": "useCachedCallback"
}
],
"use-isnan": 2,
"simple-import-sort/imports": [
"error",
{
"groups": [
["^react$", "^classnames$", "^[a-z]", "^@(?!common|processing|public|uikit|admin|tracker)"],
["^@(common|public|uikit)"],
["^@(admin|processing|tracker)"],
["^\\.\\.(?!/?$)", "^\\.\\./?$", "^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
["^.+(\\.mod)?\\.css$"],
["^.+\\.(png|gif|jpe?g|webm|mov|svg)$"],
["^\\u0000"]
]
}
]
},
"overrides": [
{
"files": ["**.*.js", "**/*.jsx"],
"rules": {
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "^React$|^_|^PropTypes$"
}
]
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"]
},
{
"files": ["**/*Spec.ts", "**/*Spec.tsx", "**/*.spec.ts", "**/*.spec.tsx", "**/*Spec.js", "spec/**"],
"env": {
"jasmine": true
},
"rules": {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": 1,
"no-empty": 0,
"no-unused-vars": 0,
"react/jsx-no-bind": 0,
"react/no-find-dom-node": 1
}
}
]
}