-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
102 lines (102 loc) · 2.63 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
module.exports = {
env: {
browser: true,
node: true,
},
extends: [ 'plugin:vue/essential', '@vue/standard' ],
overrides: [
{
files: [ '*.vuemodule' ],
rules: { indent: 'off' },
},
],
parser: 'vue-eslint-parser',
parserOptions: { parser: 'babel-eslint' },
plugins: [],
root: true,
rules: {
'array-bracket-spacing': [ 'error', 'always' ],
'arrow-parens': [ 'error', 'as-needed' ],
'arrow-spacing': 'error',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
exports: 'always-multiline',
},
],
'computed-property-spacing': [ 'error', 'always' ],
'max-len': [
'error',
120,
2,
{
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreUrls: true,
},
],
'newline-per-chained-call': [ 'error', { ignoreChainWithDepth: 10 } ],
'no-console': 'off',
'object-curly-newline': [
'error',
{
ObjectExpression: {
multiline: true, minProperties: 2,
},
ObjectPattern: {
multiline: true, minProperties: 2,
},
ImportDeclaration: {
multiline: true, minProperties: 2,
},
ExportDeclaration: {
multiline: true, minProperties: 2,
},
},
],
'object-curly-spacing': [ 'error', 'always' ],
'object-property-newline': 'error',
quotes: [ 'error', 'single' ],
semi: [ 'error', 'always' ],
'space-in-parens': [ 'error', 'always' ],
'space-infix-ops': [ 'error', { int32Hint: true } ],
'template-curly-spacing': [ 'error', 'always' ],
'vue/array-bracket-spacing': [ 'error', 'always' ],
'vue/comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
functions: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
},
],
'vue/component-name-in-template-casing': [ 'error', 'kebab-case' ],
'vue/object-curly-spacing': [ 'error', 'always' ],
'vue/v-on-function-call': [ 'error', 'never' ],
'vue/require-direct-export': 'error',
'vue/script-indent': [
'error',
2,
{
baseIndent: 0,
switchCase: 1,
},
],
'vue/singleline-html-element-content-newline': [
'error',
{
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
},
],
'vue/space-infix-ops': [ 'error', { int32Hint: true } ],
},
};