forked from lodash/lodash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
125 lines (86 loc) · 2.36 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
module.exports = {
'extends': ['plugin:import/errors'],
'plugins': ['import'],
'env': {
'es6': true,
'node': true
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'impliedStrict': true,
'objectLiteralDuplicateProperties': false
}
},
'rules': {
'array-bracket-spacing': ['error', 'never'],
'camelcase': ['error', {
'properties': 'never'
}],
'comma-dangle': ['error', 'never'],
'curly': ['error', 'all'],
'eol-last': ['error'],
'indent': ['error', 2, {
'SwitchCase': 1
}],
'keyword-spacing': ['error'],
'max-len': ['error', {
'code': 180,
'ignoreComments': true,
'ignoreRegExpLiterals': true
}],
'no-else-return': ['error'],
'no-mixed-spaces-and-tabs': ['error'],
'no-multiple-empty-lines': ['error'],
'no-spaced-func': ['error'],
'no-trailing-spaces': ['error'],
'no-undef': ['error'],
'no-unexpected-multiline': ['error'],
'no-unused-vars': ['error', {
'args': 'none',
'vars': 'all'
}],
'quotes': ['error', 'single', {
'allowTemplateLiterals': true,
'avoidEscape': true
}],
'semi': ['error', 'never'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'space-unary-ops': ['error', {
'nonwords': false,
'overrides': {}
}],
// 'valid-jsdoc': ['error']
// ECMAScript 6 rules
'arrow-body-style': ['error', 'as-needed', {
'requireReturnForObjectLiteral': false
}],
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', {
'after': true,
'before': true
}],
'no-class-assign': ['error'],
'no-const-assign': ['error'],
'no-dupe-class-members': ['error'],
'no-duplicate-imports': ['error'],
'no-new-symbol': ['error'],
'no-useless-rename': ['error'],
'no-var': ['error'],
'object-shorthand': ['error', 'always', {
'avoidQuotes': true,
'ignoreConstructors': false
}],
'prefer-arrow-callback': ['error', {
'allowNamedFunctions': false,
'allowUnboundThis': true
}],
'prefer-const': ['error'],
'prefer-rest-params': ['error'],
'prefer-template': ['error'],
'template-curly-spacing': ['error', 'never']
}
};