-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
79 lines (78 loc) · 1.82 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true,
tsx: true,
},
},
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'@vue/eslint-config-typescript/recommended',
],
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
rules: {
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'no-console': 'off',
'no-debugger': 'warn',
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
camelcase: ['error', { properties: 'never' }],
semi: ['error', 'never'],
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'import/no-unused-modules': 'error',
'import/no-unresolved': 'off',
// vue
'vue/max-attributes-per-line': ['error', {
'singleline': {
'max': 1
},
'multiline': {
'max': 1
},
}],
'vue/html-closing-bracket-spacing': 'error',
'vue/require-default-prop': 'error',
'vue/require-explicit-emits': 'error',
},
ignorePatterns: ['dist', 'node_modules'],
}