-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
91 lines (91 loc) · 3.16 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 = {
root: true,
env: {
browser: true,
es6: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'eslint:recommended',
'plugin:vue/recommended'
],
plugins: [
'vue'
],
// add your custom rules here
rules: {
'array-bracket-newline': ['error', 'consistent'],
'array-bracket-spacing': ['error', 'never'],
'array-element-newline': ['error', 'consistent'],
'arrow-spacing': 'error',
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', { 'allowSingleLine': false }],
'camelcase': ['error', { 'ignoreDestructuring': false }],
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', { 'before': false, 'after': true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': ['error', 'never'],
'curly': 'error',
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'func-style': ['error', 'declaration', { 'allowArrowFunctions': true }],
'function-call-argument-newline': ['error', 'consistent'],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-double'],
'key-spacing': ['error', { 'afterColon': true }],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'linebreak-style': ['error', 'unix'],
// Disabled pending manual resolution of violations
// 'max-len': ['error', { 'code': 120 }],
'no-array-constructor': 'error',
'no-bitwise': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-lonely-if': 'error',
'no-mixed-operators': 'error',
'no-multi-assign': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'no-negated-condition': 'error',
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-tabs': 'error',
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'error',
'no-unneeded-ternary': 'error',
'no-var': 'error',
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': ['error', 'beside'],
'object-curly-newline': ['error', { 'consistent': true }],
'object-curly-spacing': ['error', 'always'],
'object-shorthand': ['error', 'always'],
'padded-blocks': ['error', 'never'],
'prefer-arrow-callback': 'error',
'quotes': ['error', 'single'],
'semi-spacing': ['error'],
'semi-style': ['error', 'last'],
'semi': ['error', 'always'],
// Disabled pending manual resolution of violations
// 'sort-keys': 'error',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'space-infix-ops': ['error', { 'int32Hint': false }],
'space-unary-ops': 'error',
'spaced-comment': ['error', 'always'],
'switch-colon-spacing': 'error',
// 'vue/script-indent': ['error', 2, { 'baseIndent': 1 }]
},
'overrides': [
{
'files': ['*.vue'],
'rules': {
'indent': 'off'
}
}
]
};