forked from cockpit-project/cockpit-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
66 lines (63 loc) · 2.14 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
{
"root": true,
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react", "plugin:jsx-a11y/recommended"],
"parserOptions": {
"ecmaVersion": 2022
},
"plugins": ["react", "react-hooks", "jsx-a11y"],
"rules": {
"array-bracket-newline": ["error", { "multiline": true }],
"indent": ["error", 4,
{
"ObjectExpression": "first",
"CallExpression": {"arguments": "first"},
"MemberExpression": 2,
"ignoredNodes": [ "JSXAttribute" ]
}],
"function-paren-newline": ["error", "consistent"],
"space-before-function-paren": "off",
"max-len": ["error", { "code": 120 }],
"max-statements-per-line": ["error", { "max": 1 }],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"no-var": "error",
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
"react/jsx-indent": ["error", 4],
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"camelcase": "off",
"comma-dangle": "off",
"curly": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"no-console": "off",
"quotes": "off",
"react/prop-types": "off",
"react/jsx-handler-names": "off",
"react/jsx-max-props-per-line": [1, { "maximum": 2 }],
"react/jsx-no-useless-fragment": "error",
"jsx-a11y/anchor-is-valid": "off"
},
"globals": {
"require": "readonly",
"module": "readonly"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": [
"@typescript-eslint"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
}
}
]
}