forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
159 lines (159 loc) · 3.95 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
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
{
"rules": {
"strict": [2, "never"],
"no-undef": 2,
"no-var": 1,
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "^_.+",
"ignoreRestSiblings": true
}
],
"no-empty": [1, { "allowEmptyCatch": true }],
"curly": [1, "all"],
"eqeqeq": [1, "smart"],
"import/no-commonjs": 1,
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
},
{
"pattern": "metabase/**",
"group": "internal"
},
{
"pattern": "metabase/**/components",
"group": "internal",
"position": "before"
},
{
"pattern": "__**",
"group": "internal",
"position": "before"
},
{
"pattern": "metabase-lib/**",
"group": "internal",
"position": "after"
}
],
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object"
]
}
],
"no-console": 0,
"react/no-is-mounted": 2,
"react/prefer-es6-class": 2,
"react/display-name": 1,
"react/prop-types": 2,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"react/no-find-dom-node": 0,
"react/no-children-prop": 2,
"react/no-string-refs": 2,
"react/no-unescaped-entities": 2,
"react/jsx-no-target-blank": 2,
"react/jsx-key": 2,
"react/forbid-component-props": [2, { "forbid": ["w", "h"] }],
"react-hooks/exhaustive-deps": [
"warn",
{ "additionalHooks": "(useSyncedQueryString|useSafeAsyncFunction)" }
],
"prefer-const": [1, { "destructuring": "all" }],
"no-useless-escape": 0,
"no-only-tests/no-only-tests": "error",
"complexity": ["error", { "max": 54 }]
},
"globals": {
"before": true,
"cy": true,
"Cypress": true
},
"env": {
"browser": true,
"es6": true,
"commonjs": true,
"jest": true,
"jest/globals": true
},
"parser": "babel-eslint",
"plugins": ["react", "no-only-tests"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"settings": {
"import/internal-regex": "^metabase/|^metabase-lib/",
"import/resolver": "webpack",
"import/ignore": ["\\.css$"],
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaFeatures": {
"legacyDecorators": true
}
},
"overrides": [
{
"extends": ["plugin:@typescript-eslint/recommended"],
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"prefer-rest-params": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"varsIgnorePattern": "^_.+",
"ignoreRestSiblings": true,
"destructuredArrayIgnorePattern": "^_"
}
]
}
},
{
"extends": [
"plugin:jest/recommended",
"plugin:jest-dom/recommended",
"plugin:testing-library/react"
],
"plugins": ["jest", "jest-dom", "testing-library"],
"files": [
"*.unit.spec.ts",
"*.unit.spec.tsx",
"*.unit.spec.js",
"*.unit.spec.jsx"
],
"rules": {
"jest/valid-title": ["error", { "ignoreTypeOfDescribeName": true }]
}
}
]
}