-
Notifications
You must be signed in to change notification settings - Fork 23
/
.eslintrc.js
53 lines (52 loc) · 997 Bytes
/
.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
const config = require('./configs/webpack.config.js');
module.exports = {
parser: 'babel-eslint',
plugins: ['prettier', 'react'],
env: {
node: true,
es6: true
},
overrides: [
{
files: ['webapp/**/*.js'],
excludedFiles: '**/node_modules',
env: {
node: false,
browser: true,
commonjs: true
},
globals: {
NODE_ENV: true,
BPANEL_SOCKET_PORT: true,
SECRETS: true
}
},
{
files: ['webapp/test/**/*.js', 'server/test/**/*.js'],
env: {
mocha: true
}
}
],
rules: {
'prettier/prettier': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-param-reassign': 'warn'
},
settings: {
react: {
version: '^16.3.0'
},
'import/resolver': {
webpack: {
config: config({})
}
}
},
extends: [
'prettier',
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/errors'
]
};