-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.32 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
globals: {
moment: 'readonly',
Alice: 'readonly',
},
extends: [
'plugin:unicorn/recommended',
'plugin:sonarjs/recommended',
'prettier',
],
plugins: ['prettier', 'sonarjs', 'unicorn'],
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
},
rules: {
'global-require': 0,
// Only allow debugger in development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// Only allow `console.log` in development
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'import/no-unresolved': 0,
'no-unused-vars': [
'error',
{ vars: 'all', args: 'none', ignoreRestSiblings: false },
],
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: ['state'],
},
],
'no-underscore-dangle': 'warn',
'sonarjs/no-identical-expressions': 'error',
'sonarjs/no-identical-functions': 'warn',
'sonarjs/cognitive-complexity': ['warn', 15],
'unicorn/filename-case': [
'error',
{
cases: {
camelCase: true,
pascalCase: true,
},
},
],
'unicorn/prevent-abbreviations': 'warn',
'unicorn/no-null': 0,
},
}