-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
101 lines (101 loc) · 2.88 KB
/
index.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
module.exports = {
extends: [
'standard',
'plugin:vue/recommended',
'plugin:unicorn/recommended',
'plugin:varspacing/recommended',
],
plugins : ['unicorn', 'varspacing'],
env : { es6: true },
parser : 'vue-eslint-parser',
parserOptions: { parser: 'babel-eslint', sourceType: 'module' },
rules : {
'curly' : ['error', 'multi-or-nest'],
'array-element-newline': ['error', { multiline: true, minItems: 3 }],
'array-bracket-newline': [
'error',
{
multiline: true,
minItems : 3,
},
],
'object-curly-newline': [
'error',
{
ObjectExpression: {
multiline : true,
minProperties: 3,
},
ObjectPattern : 'never',
ImportDeclaration: 'never',
ExportDeclaration: 'always',
},
],
'object-property-newline': 'error',
'camelcase' : 'warn',
'comma-dangle' : ['error', 'always-multiline'],
'no-multi-spaces' : [
'error',
{
exceptions: {
VariableDeclarator : true,
AssignmentExpression: true,
},
},
],
'no-var' : 'error',
'prefer-template' : 'error',
'linebreak-style' : 'off',
'no-console' : ['error', { allow: ['warn', 'error'] }],
'prefer-const' : ['error', { destructuring: 'all' }],
'quote-props' : ['error', 'consistent-as-needed'],
'object-curly-spacing': ['error', 'always'],
'key-spacing' : [
'error',
{
align: {
beforeColon: false,
afterColon : true,
on : 'colon',
},
},
],
'arrow-parens' : ['error', 'always'],
'operator-linebreak' : ['error', 'before'],
'vue/require-default-prop' : 'off',
'vue/require-prop-types' : 'off',
'vue/prop-name-casing' : ['error', 'camelCase'],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/html-closing-bracket-newline' : [
'error',
{
singleline: 'never',
multiline : 'never',
},
],
'unicorn/catch-error-name' : ['error', { name: 'error' }],
'unicorn/prevent-abbreviations': [
'error',
{
checkProperties : false,
checkShorthandProperties: false,
whitelist : { getErrMsg: true },
},
],
},
overrides: [
{
files: ['*.vue'],
rules: { 'unicorn/filename-case': ['error', { case: 'pascalCase' }] },
},
{
files: ['*.spec.js'],
env : { node: true, mocha: true },
rules: { 'no-console': 'off' },
},
{
files: ['pages/**/*.vue', 'layouts/**/*.vue'],
rules: { 'unicorn/filename-case': ['error', { case: 'kebabCase' }] },
},
],
}