-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
93 lines (93 loc) · 2.43 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
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
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:sonarjs/recommended"
],
"rules": {
"react/prop-types": "off",
"arrow-body-style": "off",
"arrow-parens": ["off", "as-needed"],
"complexity": "off",
"constructor-super": "error",
"curly": "error",
"dot-notation": "error",
"eol-last": "error",
"guard-for-in": "error",
"id-length": ["error", { "exceptions": ["_", "t", "a", "b", "i"] }],
"max-classes-per-file": ["error", 1],
"max-lines": ["error", { "max": 200, "skipBlankLines": true, "skipComments": true }],
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": [
"error",
{
"allow": ["debug", "info", "log", "time", "timeEnd", "trace"]
}
],
"no-debugger": "error",
"no-unused-vars": ["error", { "vars": "all", "args": "all", "argsIgnorePattern": "^_.*_?$","varsIgnorePattern": "^_.*_?$" }],
"no-empty": "off",
"no-empty-functions": "off",
"no-eval": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-wrappers": "error",
"no-throw-literal": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-const": "error",
"quote-props": ["error", "as-needed"],
"radix": "error",
"use-isnan": "error",
"valid-typeof": "off",
"sonarjs/cognitive-complexity": ["error", 10],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"jsx-a11y/no-onchange": "off"
},
"globals": {},
"parserOptions": {
"project": "tsconfig.json",
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["react-hooks", "sonarjs"],
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": [
"src/**/*.test.*",
"src/**/*.types.*",
"src/**/*.stories.*",
"src/styles/**/*.*",
"src/stubs/**/*.*",
".storybook/**/*.*"
],
"rules": {
"max-statements": "off",
"max-lines": "off",
"react-hooks/rules-of-hooks": "off",
"react/display-name": "off"
}
}
]
}