-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path.eslintrc.js
42 lines (42 loc) · 1.18 KB
/
.eslintrc.js
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
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
plugins: ["sonarjs", "jest"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"react-app",
"plugin:sonarjs/recommended",
"plugin:jest/recommended",
"plugin:jest-dom/recommended",
],
rules: {
// We shouldn't really use ANY but we can't have everything perfect
"@typescript-eslint/no-explicit-any": "off",
// We kinda need interface not type
"@typescript-eslint/no-empty-interface": "off",
// We are OK with disabled tests
"jest/no-disabled-tests": "off",
// In fact we are OK with == instead of === as we aren't sure if
// data type in API is number/string. It really doesn't matter;
eqeqeq: "off",
"jest/expect-expect": "off",
"sonarjs/cognitive-complexity": ["error", 25],
// We want to use referrer
"react/jsx-no-target-blank": 0,
},
overrides: [
// We want always switch in Reducers
{
files: ["**/reducer.ts"],
rules: {
"sonarjs/no-small-switch": "off",
},
},
],
};