-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
52 lines (50 loc) · 1.23 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
const isProduction = process.env.NODE_ENV === 'production';
const off = 0;
const warn = 1;
const error = 2;
module.exports = {
extends: ['airbnb-base', 'plugin:import/errors', 'plugin:import/warnings'],
plugins: ['import'],
env: {
es6: true,
node: true,
browser: true,
},
globals: {
'$Diff': true,
},
rules: {
'arrow-parens': [
error,
'as-needed',
{ 'requireForBlockBody': true },
],
'comma-dangle': [
error,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
},
],
'function-paren-newline': [error, 'consistent'],
indent: off,
'max-len': [error, 150, { ignoreComments: true }],
'no-console': isProduction ? error : off,
'no-multiple-empty-lines': [error, { max: error, maxEOF: error }],
'no-implicit-coercion': error,
'no-unused-vars': [
error, {
args: 'after-used',
ignoreRestSiblings: true,
varsIgnorePattern: 'Fragment',
},
],
'no-void': off,
'object-curly-newline': [error, { consistent: true }],
'quotes': [error, 'single'],
},
parser: 'babel-eslint',
};