generated from lvzhenbo/naive-tailwind-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
58 lines (57 loc) · 1.82 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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier',
'./.eslintrc-auto-import.json',
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
},
rules: {
// 允许被禁止的类型 https://typescript-eslint.io/rules/ban-types/
'@typescript-eslint/ban-types': 'off',
// 允许any类型 https://typescript-eslint.io/rules/no-explicit-any/
'@typescript-eslint/no-explicit-any': 'off',
// 允许任何TS指令注释 https://typescript-eslint.io/rules/ban-ts-comment
'@typescript-eslint/ban-ts-comment': 'off',
// 允许空函数 https://typescript-eslint.io/rules/no-empty-function/
'@typescript-eslint/no-empty-function': 'off',
// 禁止未使用变量,除了下划线开头 https://typescript-eslint.io/rules/no-unused-vars/
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
// 关闭强制多词组件名 https://eslint.vuejs.org/rules/multi-word-component-names.html
'vue/multi-word-component-names': 'off',
// 强制执行自我关闭风格 https://eslint.vuejs.org/rules/html-self-closing.html
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
// 禁止未使用变量,除了下划线开头 https://eslint.org/docs/latest/rules/no-unused-vars
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
};