-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
executable file
·91 lines (88 loc) · 1.86 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
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
plugins: ['react', 'jsdoc'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
allowImportExportEverywhere: true,
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true
}
},
env: {
browser: true,
node: true,
es6: true
},
rules: {
// Common js rules
'brace-style': [
2,
'1tbs',
{
allowSingleLine: true
}
],
camelcase: 2,
curly: 2,
eqeqeq: 2,
'no-extend-native': 2,
'no-proto': 2,
'no-caller': 2,
'no-unused-vars': [
2,
{
vars: 'all',
args: 'none'
}
],
'new-cap': 0,
quotes: [2, 'single'],
'max-depth': [2, 3],
'max-statements': [2, 45],
'max-len': [2, 200],
'no-eq-null': 2,
'operator-linebreak': 2,
'no-multiple-empty-lines': [
2,
{
max: 2
}
],
'no-mixed-spaces-and-tabs': 0,
'space-unary-ops': 2,
'no-multi-spaces': 2,
'space-before-blocks': 0,
'keyword-spacing': 0,
'space-infix-ops': 0,
'comma-spacing': [
0,
{
before: false,
after: true
}
],
'semi': [2, 'never'],
'comma-dangle': 0,
'wrap-iife': 2,
'no-extra-semi': 2,
'semi-spacing': 2,
'spaced-comment': 2,
'func-names': 0,
// NodeJs rules
'block-scoped-var': 2,
'global-require': 0,
'no-mixed-requires': 2,
'no-new-require': 2,
// ES6 rules
'arrow-spacing': 2,
'no-const-assign': 2,
'no-var': 2,
'prefer-const': 0,
// React
'jsx-quotes': [2, 'prefer-single'],
'react/jsx-uses-react': 1,
'react/jsx-uses-vars': 1
}
};