This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
105 lines (99 loc) · 2.54 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
103
104
105
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/recommended',
'plugin:@typescript-eslint/recommended',
'@vue/standard',
'@vue/typescript'
],
rules: {
'vue/max-attributes-per-line': ['error', {
singleline: 3,
multiline: {
max: 1,
allowFirstLine: false
}
}],
'vue/order-in-components': ['error', {
order: [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
'extends',
['components', 'directives', 'filters'],
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'LIFECYCLE_HOOKS',
'data',
'computed',
'watch',
'methods',
['template', 'render'],
'renderError'
]
}],
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/block-spacing': 'error',
'vue/camelcase': 'error',
'vue/comma-dangle': 'error',
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
registeredComponentsOnly: true
}],
'vue/eqeqeq': 'error',
'vue/key-spacing': 'error',
'vue/match-component-file-name': ['error', {
extensions: ['vue'],
shouldMatchCase: true
}],
'vue/no-boolean-default': 'error',
'vue/no-restricted-syntax': 'error',
'vue/object-curly-spacing': ['error', 'always'],
'vue/space-infix-ops': 'error',
'vue/space-unary-ops': 'error',
'vue/v-on-function-call': 'error',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/interface-name-prefix': ['error', 'always'],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'none',
requireLast: true
},
singleline: {
delimiter: 'comma'
}
}],
'@typescript-eslint/explicit-function-return-type': ['error', {
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true
}],
'@typescript-eslint/explicit-member-accessibility': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
},
overrides: [
{
files: [
'**/__tests__/*.ts'
],
env: {
jest: true
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off'
}
}
]
}