-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
79 lines (74 loc) · 1.89 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
77
78
79
const { config } = require('@dhis2/cli-style')
module.exports = {
parser: 'babel-eslint',
extends: [config.eslint, 'airbnb-base', 'prettier'],
env: {
browser: true,
},
rules: {
'prefer-promise-reject-errors': 0,
'class-methods-use-this': 0,
'max-len': [
1,
120,
4,
{
ignoreComments: true,
ignoreUrls: true,
ignorePattern: '^\\s*var\\s.+=\\s*require\\s*\\(',
},
],
complexity: [1, 5],
'import/no-extraneous-dependencies': [
2,
{
optionalDependencies: false,
peerDependencies: false,
},
],
'no-useless-concat': 0,
'import/no-cycle': 0,
'import/prefer-default-export': 0,
'no-prototype-builtins': 0,
'no-plusplus': [
2,
{
allowForLoopAfterthoughts: true,
},
],
'no-multi-spaces': [
2,
{
ignoreEOLComments: true,
},
],
'no-return-assign': [2, 'except-parens'],
'prefer-destructuring': 0,
'no-param-reassign': 0,
'no-shadow': 0,
'valid-typeof': 0,
'no-restricted-globals': 0,
'prefer-object-spread': 0,
'max-classes-per-file': 0,
'global-require': 0,
'import/no-dynamic-require': 0,
},
overrides: [
{
files: ['src/**/__tests__/**/*.js', 'src/**/__mocks__/**/*.js'],
env: {
jest: true,
browser: true,
},
rules: {
'arrow-body-style': 0,
},
},
{
files: 'src/__fixtures__/fixtures.js',
rules: {
'global-require': 0,
},
},
],
}