-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
58 lines (57 loc) · 1.22 KB
/
.eslintrc.cjs
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
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
env: {
node: true
},
extends: [
// 'vue-global-api',
'eslint:recommended',
'plugin:vue/vue3-recommended',
'@vue/typescript/recommended',
'plugin:prettier/recommended'
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
js: 'espree',
ts: '@typescript-eslint/parser',
'<template>': 'espree'
},
sourceType: 'module',
ecmaFeatures: {
jsx: true,
tsx: true
}
},
rules: {
'no-undef': 'off',
'no-console': 'off',
'no-debugger': 'off',
'prettier/prettier': 'warn',
'prefer-template': 'error',
'vue/no-reserved-component-names': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'vue/no-v-html': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
normal: 'any',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
// 多字组件名称
'vue/multi-word-component-names': 'off',
// Vue属性排序
'vue/attributes-order': 'warn'
}
}