-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
64 lines (64 loc) · 2.35 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
/**
* @see https://eslint.org/docs/rules/
*/
module.exports = {
env: {
es6: true,
node: true
},
extends: 'eslint:recommended',
parserOptions: {
// Equivalent to the now deprecated `2018` option, see https://eslint.org/docs/user-guide/configuring#deprecated
ecmaVersion: 9
},
root: true,
rules: {
'arrow-spacing': 'error',
'block-spacing': 'error',
camelcase: 'error',
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', { after: true, before: false }],
'computed-property-spacing': ['error', 'never'],
'consistent-return': 'off',
'eol-last': ['error', 'always'],
eqeqeq: ['error', 'smart'],
indent: ['error', 4],
'key-spacing': [
'error',
{ afterColon: true, beforeColon: false, mode: 'strict' }
],
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'max-len': ['error', { code: 120, comments: 120 }],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-tabs': ['error', { allowIndentationTabs: false }],
'no-trailing-spaces': 'error',
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'object-property-newline': [
'error',
{ allowAllPropertiesOnSameLine: true }
],
'prefer-const': [
'error',
{ destructuring: 'any', ignoreReadBeforeAssign: false }
],
'quote-props': ['error', 'as-needed'],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
semi: ['error', 'always'],
'sort-keys': [ 'error', 'asc', { caseSensitive: false, natural: true } ],
'space-before-blocks': [
'error',
{ classes: 'always', functions: 'always', keywords: 'always' }
],
'space-before-function-paren': [
'error',
{ anonymous: 'always', asyncArrow: 'always', named: 'never' }
],
'space-infix-ops': ['error', { int32Hint: false }],
'space-unary-ops': [ 'error', { nonwords: false, words: true } ],
'spaced-comment': [ 'error', 'always' ],
'switch-colon-spacing': ['error', { after: true, before: false }]
}
};