-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc
80 lines (80 loc) · 2.77 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
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"plugin:sonarjs/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint",
"sonarjs"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"indent": ["error", 4, {
"SwitchCase": 1
}],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-filename-extension": ["error", {"extensions": [".jsx", ".js", "tsx"]}],
// I would like us to consider this in the future, but for now it is too sweeping of a change to be feasible
// It also may make code less readable in a lot of places where we use both props and state in the same functions
// (although this may be symptomatic of a bigger issue with naming things)
"max-len": 0,
"react/destructuring-assignment": ["off", "never"],
"no-plusplus": ["off"],
"operator-linebreak": ["error", "after", {
"overrides": {
"?": "before",
":": "before"
}
}],
"object-curly-newline": ["error", {
"multiline": true,
"consistent": true
}],
"no-param-reassign": ["error", {
"props": false
}],
"react/prefer-stateless-function": ["off"],
"no-mixed-operators": ["off"],
"linebreak-style": ["off"],
"no-bitwise": ["off"],
"react/no-unused-class-component-methods": ["off"],
"react/require-default-props": ["off"],
"react/function-component-definition": ["off"] ,
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/unbound-method": "off",
"sonarjs/no-duplicate-string": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-nested-template-literals": "off",
"@typescript-eslint/no-floating-promises": "off",
"no-unused-vars": "off"
},
"env": {
"browser": true,
"jest": true
}
}