-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
100 lines (100 loc) · 2.66 KB
/
.eslintrc.js
File metadata and controls
100 lines (100 loc) · 2.66 KB
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
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:@intlify/vue-i18n/recommended',
],
plugins: ['import'],
parser: 'vue-eslint-parser',
parserOptions: { ecmaVersion: 2020 },
ignorePatterns: ['node_modules/'],
rules: {
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'space-before-function-paren': [
'error',
{ anonymous: 'never', named: 'never', asyncArrow: 'always' },
],
'padded-blocks': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-multiple-empty-lines': ['error', { max: 1 }],
semi: ['error', 'always', { omitLastInOneLineBlock: true }],
'keyword-spacing': ['error', {
after: false,
overrides: {
finally: { after: true },
return: { after: true },
else: { after: true },
do: { after: true },
from: { after: true },
import: { after: true },
export: { after: true },
try: { after: true },
const: { after: true },
let: { after: true },
default: { after: true },
case: { after: true },
},
}],
'max-len': ['error', { code: 100, ignorePattern: '^\\s*<path' }],
'no-param-reassign': [2, { props: false }],
'object-curly-newline': ['error', {
consistent: true,
multiline: true,
}],
'no-extra-boolean-cast': 'error',
'import/extensions': [
'error',
{
ts: 'never',
js: 'never',
vue: 'always',
json: 'always',
png: 'always',
jpg: 'always',
mp3: 'always',
mp4: 'always',
},
],
indent: ['error', 2, { SwitchCase: 0 }],
'vue/attribute-hyphenation': ['error', 'never'],
'vue/order-in-components': ['error', {
'order': [
'name',
['provide', 'inject'],
'ROUTER_GUARDS',
'emits',
['props', 'propsData'],
'setup',
],
}],
'vue/html-indent': ['error', 2, { baseIndent: 0 }],
'vue/singleline-html-element-content-newline': ['error', {
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
}],
'vue/max-attributes-per-line': ['error', {
singleline: 3,
}],
'vue/no-v-html': 'off',
'@intlify/vue-i18n/no-v-html': 'off',
'@intlify/vue-i18n/no-unused-keys': ['error', {
src: './src',
extensions: ['.js', '.vue'],
}],
'@intlify/vue-i18n/no-raw-text': 'error',
},
settings: {
'vue-i18n': {
localeDir: './src/translations/*.json',
},
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.vue', '.json'],
},
},
},
};