-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 1.77 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
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
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
},
globals: {
bootstrap: 'readonly',
ApexCharts: 'readonly',
moment: 'readonly',
},
extends: [
'eslint:recommended',
'eslint-config-prettier',
'plugin:sonarjs/recommended',
'plugin:react/recommended',
],
root: true,
parserOptions: {
sourceType: 'module',
ecmaVersion: 13,
},
settings: {
react: {
version: 'detect',
},
},
plugins: ['react', 'sonarjs', 'unused-imports'],
rules: {
'linebreak-style': [2, 'unix'],
quotes: [1, 'single', 'avoid-escape'],
semi: [2, 'always'],
'max-len': [1, 120, 2, {ignoreUrls: true}],
'no-trailing-spaces': 2,
'no-multi-spaces': 2,
'array-bracket-spacing': 2,
'keyword-spacing': ['error', {after: true, before: true}],
'max-depth': [2, 7],
'max-statements': [2, 133],
complexity: [2, 45],
'no-eval': 2,
'no-underscore-dangle': 0,
'no-loop-func': 2,
'no-floating-decimal': 2,
eqeqeq: [2, 'smart'],
'new-cap': 2,
'no-empty': 0,
'space-infix-ops': 2,
'comma-dangle': [2, 'always-multiline'],
curly: [0, 'multi-or-nest', 'consistent'],
'no-constant-condition': ['error', {checkLoops: false}],
'no-unused-vars': 0,
'react/prop-types': 0,
'unused-imports/no-unused-imports': 2,
'unused-imports/no-unused-vars': [
2,
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
},
overrides: [
{
files: ['ui/scripts/**/*.js', 'ui/config/**/*.js'],
env: {node: true},
rules: {
'max-len': 0,
'@typescript-eslint/no-var-requires': 0,
'sonarjs/cognitive-complexity': 0,
},
},
],
};