-
Notifications
You must be signed in to change notification settings - Fork 20
/
eslint.config.js
45 lines (44 loc) · 1.29 KB
/
eslint.config.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
const babelParser = require('@babel/eslint-parser');
const flowtypePlugin = require('eslint-plugin-flowtype');
const jestPlugin = require('eslint-plugin-jest');
const importPlugin = require('eslint-plugin-import');
module.exports = {
languageOptions: {
parser : babelParser,
globals : {
PRODUCTION: true
}
},
ignores : ['src/assets/*'],
plugins : {
'flowtype' : flowtypePlugin,
'jest' : jestPlugin,
'import' : importPlugin
},
rules: {
'no-console' : 0,
'global-require' : 0,
'no-use-before-define' : 0,
'no-underscore-dangle' : 0,
'class-methods-use-this' : 0,
'import/prefer-default-export' : 0,
'comma-dangle' : [2, 'never'],
'import/no-extraneous-dependencies' : [2, { devDependencies: true }],
'key-spacing' : ['error', {
align: {
beforeColon : true,
afterColon : true,
on : 'colon'
}
}],
'max-depth' : ['error', 2],
'max-nested-callbacks' : ['error', 2],
'max-statements' : ['error', 15],
'max-len' : ['error', 150]
},
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true
}
}
};