-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.js
57 lines (55 loc) · 1.7 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
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
}
},
plugins: [
'import',
'react'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': ['error', 'always'],
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'comma-style': [2, 'last'],
'comma-spacing': ['error', {'before': false, 'after': true}],
'no-unused-vars': 0,
'no-const-assign': 1,
'no-var': 1,
'indent': ['error', 2],
'no-whitespace-before-property': 1,
'object-curly-spacing': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'object-shorthand': ['error', 'always'],
'quote-props': ['warn', 'as-needed'],
'no-array-constructor': 1,
'no-new-object': 1,
'quotes': ['error', 'single', { allowTemplateLiterals: true }],
'prefer-const': 2,
'prefer-template': 1,
'prefer-spread': 2,
'prefer-rest-params': 2,
'padded-blocks': ['error', 'never'],
'eqeqeq': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: false } ],
'no-loop-func': ['error'],
'dot-notation': ['error'],
'keyword-spacing': ['error', { before: true, after: true }],
'space-in-parens': ['error', 'never'],
'space-unary-ops': ['error', { words: true, nonwords: false }],
'camelcase': ['error', { properties: 'never' }],
'array-bracket-spacing': ['error', 'never'],
'semi': ['error', 'never'],
// jsx
'react/jsx-space-before-closing': ['warn', 'always']
}
}