-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.js
67 lines (64 loc) · 1.51 KB
/
vue.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
// @ts-check
const { defineConfig } = require('eslint-define-config');
module.exports = defineConfig({
globals: {
// Reactivity Transform
$: 'readonly',
$$: 'readonly',
$ref: 'readonly',
$shallowRef: 'readonly',
$computed: 'readonly',
$customRef: 'readonly',
$toRef: 'readonly',
},
overrides: [
{
files: ['*.vue'],
parser: 'vue-eslint-parser',
parserOptions: {
sourceType: 'module',
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: true,
},
},
globals: {
// script setup
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
// RFC: https://github.com/vuejs/rfcs/discussions/430
defineOptions: 'readonly',
},
rules: {
'no-undef': 'off',
},
},
],
extends: ['prettier', 'plugin:vue/vue3-recommended'],
rules: {
'vue/max-attributes-per-line': 'off',
'vue/no-v-html': 'off',
'vue/multi-word-component-names': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
// Reactivity Transform
'vue/no-setup-props-destructure': 'off',
'vue/component-tags-order': [
'error',
{ order: ['script', 'template', 'style'] },
],
},
});