-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.json
58 lines (56 loc) · 2.13 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
{
"root": true,
"env": {
"browser": true,
"es2022": true
},
"extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react"],
"parserOptions": {
"ecmaVersion": 2022
},
"plugins": ["react", "react-hooks", "simple-import-sort", "sort-destructure-keys"],
"rules": {
"comma-dangle": "off",
"indent": ["error", 4,
{
"ObjectExpression": "first",
"CallExpression": {"arguments": "first"},
"MemberExpression": 2,
"ignoredNodes": [ "JSXAttribute" ]
}],
"jsx-quotes": ["error", "prefer-double"],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"no-console": "off",
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }],
"no-var": "error",
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
"quotes": ["error", "double" ],
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
"sort-destructure-keys/sort-destructure-keys": 2,
"sort-keys": ["error", "asc", {"caseSensitive": true, "natural": true, "minKeys": 2}],
"simple-import-sort/imports": ["error", { "groups": [
["^cockpit$"],
["^"],
["^react", "^@patternfly"],
["/apis"],
["/actions", "/reducer"],
["/helpers"],
["/components.*js[x]$"],
["^cockpit-", "^os-release", "^dialogs"],
["^\\."],
["\\.scss"]
] }],
"import/no-useless-path-segments": "error",
"react/hook-use-state": ["error", { "allowDestructuredState": false }],
"react/jsx-closing-bracket-location": "off",
"react/jsx-indent": ["error", 4],
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "error",
"react-hooks/rules-of-hooks": "error"
},
"globals": {
"require": false,
"module": false
}
}