/
index.js
70 lines (68 loc) · 2.18 KB
/
index.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
module.exports = {
rules: {
// Bugs https://sonarcloud.io/organizations/opensource/rules#qprofile=AV7g2D3v6oOvObTbiZD9|activation=true|types=BUG
'no-delete-var': 1,
'use-isnan': 2,
'constructor-super': 2,
'no-this-before-super': 2,
'no-new-symbol': 2,
'no-with': 1,
'for-direction': 2,
'sonarjs/no-all-duplicated-branches': 2,
'no-const-assign': 2,
'no-bitwise': 2,
'array-callback-return': 2,
'sonarjs/no-element-overwrite': 2,
'no-sequences': 2,
'no-empty-pattern': 2,
'no-dupe-args': 2,
'sonarjs/no-extra-arguments': 2,
'require-yield': 2,
'no-self-compare': 2,
'sonarjs/no-identical-expressions': 2,
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unreachable': 2,
'no-unused-expressions': 2,
'space-unary-ops': 2,
'space-infix-ops': 2,
'no-dupe-keys': 2,
'sonarjs/no-identical-conditions': 2,
'no-unsafe-negation': 2,
'sonarjs/no-use-of-empty-return-value': 2,
'no-self-assign': 2,
// Vulnerabilities: https://sonarcloud.io/organizations/opensource/rules#qprofile=AV7g2D3v6oOvObTbiZD9|activation=true|types=VULNERABILITY
'no-alert': 1,
'no-debugger': 1,
'no-wildcard-postmessage/no-wildcard-postmessage': 2,
// Code smells: https://sonarcloud.io/organizations/opensource/rules#qprofile=AV7g2D3v6oOvObTbiZD9|activation=true|types=CODE_SMELL
'sonarjs/no-useless-catch': 1,
'sonarjs/no-small-switch': 1,
'no-restricted-syntax': 2,
'no-labels': 2,
'sonarjs/max-switch-cases': 2,
'sonarjs/prefer-while': 1,
'sonarjs/no-inverted-boolean-check': 1,
'no-constant-condition': 2,
'no-sequences': 2,
'no-unused-vars': 2,
'filenames/match-exported': 1,
'no-extra-semi': 1,
'no-unexpected-multiline': 1,
'new-cap': 2,
'no-loop-func': 2,
'no-continue': 2,
'no-restricted-syntax': 2,
'no-labels': 2,
'no-multi-str': 1,
'no-empty': 2,
'sonarjs/prefer-single-boolean-return': 1,
'no-fallthrough': 2,
'sonarjs/no-duplicated-branches': 2,
'no-unused-vars': 1,
'no-redeclare': 2,
'no-undef': 2,
'no-new-wrappers': 1
},
plugins: ['no-wildcard-postmessage', 'filenames', 'sonarjs']
};