-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.eslintrc.cjs
36 lines (36 loc) · 1.04 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
// 配置信息
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true
},
parser: 'vue-eslint-parser',
extends: [
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended'
],
parserOptions: {
ecmaVersion: 12,
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: ['vue', '@typescript-eslint'],
settings: {},
rules: {
'@typescript-eslint/no-explicit-any': 'off', // 禁止使用该any类型。
'@typescript-eslint/no-unused-vars': 'off', //禁止未使用的变量
'vue/valid-template-root': 'off',
'vue/no-v-html': 'off',
'prefer-const': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-non-null-assertion': 'off', // 关闭 !断言赋值警告
'vue/require-default-prop': 'off' // props 需要设置默认值
}
}