-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
60 lines (57 loc) · 1.82 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
const eslintConfig = {
extends : [
'standard',
'eslint:recommended'
],
env : {
es6 : true
},
plugins : [],
rules : {
'brace-style' : [2, 'stroustrup', { allowSingleLine : true }],
curly : [2, 'multi-line'],
'import/export' : 1,
'import/extensions' : ['error', 'never', { json : ['error', 'always'] }],
indent : [2, 2, {
FunctionDeclaration : { body : 1, parameters : 2 },
ignoredNodes : ['JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild']
}],
'key-spacing' : [2, {
singleLine : {
beforeColon : true,
afterColon : true,
mode : 'strict'
},
multiLine : {
beforeColon : true,
afterColon : true,
align : 'colon'
}
}],
'operator-linebreak' : [2, 'before', { overrides : { '=' : 'after' } }],
'prefer-const' : 2,
'prefer-spread' : 2,
'space-before-function-paren' : [2, 'never'],
'array-callback-return' : 2,
'guard-for-in' : 2,
'no-caller' : 2,
'no-extra-bind' : 2,
'no-multi-spaces' : 2,
'no-new-wrappers' : 2,
'no-throw-literal' : 2,
'no-unexpected-multiline' : 2,
'no-with' : 2,
yoda : 2
}
}
/*
if (pkglib.target.isReactish) {
eslintConfig.extends.push('standard-react')
eslintConfig.plugins.push('react')
Object.assign(eslintConfig.rules, {
'react/jsx-boolean-value' : [2, 'never'],
'react/jsx-indent-props' : [2, 4]
})
}
*/
module.exports = eslintConfig