-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
83 lines (82 loc) · 2.65 KB
/
eslint.config.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
import antfu from '@antfu/eslint-config'
export default antfu(
{
formatters: true,
regexp: false,
vue: true,
},
{
languageOptions: {
ecmaVersion: 'latest',
},
rules: {
'@typescript-eslint/consistent-type-definitions': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'no-new': 'off',
'node/prefer-global/process': 'off',
'ts/ban-ts-comment': 'off',
'ts/no-unsafe-function-type': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/prefer-number-properties': 'off',
'unocss/order-attributify': 'off',
'vue/block-order': ['warn', { order: ['script', 'template', 'style'] }],
'vue/component-api-style': ['warn', ['script-setup', 'composition']],
'vue/component-name-in-template-casing': [
'warn',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: ['/^icon-/'],
},
],
'vue/component-options-name-casing': ['warn', 'PascalCase'],
'vue/custom-event-name-casing': ['warn', 'camelCase'],
'vue/define-emits-declaration': ['warn', 'type-based'],
'vue/define-macros-order': 'off',
'vue/define-props-declaration': ['warn', 'type-based'],
'vue/html-comment-content-newline': 'warn',
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: Infinity,
},
multiline: {
max: 1,
},
},
],
'vue/multi-word-component-names': 'off',
'vue/next-tick-style': ['warn', 'promise'],
'vue/no-duplicate-attr-inheritance': 'warn',
'vue/no-required-prop-with-default': 'warn',
'vue/no-static-inline-styles': 'off',
'vue/no-template-target-blank': 'error',
'vue/no-this-in-before-route-enter': 'error',
'vue/no-undef-properties': 'warn',
'vue/no-unsupported-features': 'warn',
'vue/no-unused-emit-declarations': 'warn',
'vue/no-unused-properties': 'warn',
'vue/no-unused-refs': 'warn',
'vue/no-use-v-else-with-v-for': 'error',
'vue/no-useless-mustaches': 'off',
'vue/no-useless-v-bind': 'error',
'vue/no-v-text': 'warn',
'vue/padding-line-between-blocks': 'warn',
'vue/prefer-define-options': 'warn',
'vue/prefer-separate-static-class': 'warn',
'vue/prop-name-casing': ['warn', 'camelCase'],
'vue/require-macro-variable-name': [
'warn',
{
defineProps: 'props',
defineEmits: 'emit',
defineSlots: 'slots',
useSlots: 'slots',
useAttrs: 'attrs',
},
],
'vue/valid-define-options': 'warn',
},
},
)