-
Notifications
You must be signed in to change notification settings - Fork 24
/
.eslintrc
80 lines (80 loc) · 2.35 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
{
"root": true,
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"standard",
"plugin:sonarjs/recommended",
// disables rules that conflict with prettier
// must come last
"prettier",
"prettier/standard"
],
"plugins": ["react", "react-hooks", "sonarjs", "standard", "no-only-tests"],
"rules": {
"camelcase": "warn",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-prototype-builtins": "warn",
"no-only-tests/no-only-tests": "error",
"no-unreachable": "error",
"no-unused-vars": "error",
"react/boolean-prop-naming": "warn",
"react/jsx-key": "warn",
"react/no-deprecated": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-find-dom-node": "warn",
"react/no-unescaped-entities": "warn",
"react/no-string-refs": "warn",
"react/prop-types": "warn",
"react/no-danger": "error",
"semi": ["error", "always"],
"sonarjs/cognitive-complexity": "off",
"sonarjs/prefer-single-boolean-return": "off",
"no-extra-semi": "error",
"standard/computed-property-even-spacing": "off",
"react-hooks/exhaustive-deps": "warn" // For checking hook dependencies
},
"ignorePatterns": ["e2e/playwright-report", "e2e/html-reports"],
"overrides": [
{
"extends": ["plugin:@typescript-eslint/recommended"],
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["app/assets/tsconfig.json", "e2e/tsconfig.json", "./tsconfig.json"]
},
"plugins": ["@typescript-eslint/eslint-plugin"],
"rules": {
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"camelcase": "off",
"@typescript-eslint/camelcase": "off",
"semi": "off",
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
},
{
"files": ["*.spec.ts"],
"rules": {
"sonarjs/no-duplicate-string": "off"
}
}
],
"settings": {
"propWrapperFunctions": ["forbidExtraProps"],
"react": {
"version": "detect"
},
"max-len": 120
}
}