提交 | 用户 | 时间
|
37b204
|
1 |
// @ts-check |
H |
2 |
const { defineConfig } = require('eslint-define-config') |
|
3 |
module.exports = defineConfig({ |
|
4 |
root: true, |
|
5 |
env: { |
|
6 |
browser: true, |
|
7 |
node: true, |
|
8 |
es6: true |
|
9 |
}, |
|
10 |
parser: 'vue-eslint-parser', |
|
11 |
parserOptions: { |
|
12 |
parser: '@typescript-eslint/parser', |
|
13 |
ecmaVersion: 2020, |
|
14 |
sourceType: 'module', |
|
15 |
jsxPragma: 'React', |
|
16 |
ecmaFeatures: { |
|
17 |
jsx: true |
|
18 |
} |
|
19 |
}, |
|
20 |
extends: [ |
|
21 |
'plugin:vue/vue3-recommended', |
|
22 |
'plugin:@typescript-eslint/recommended', |
|
23 |
'prettier', |
|
24 |
'plugin:prettier/recommended', |
|
25 |
'@unocss' |
|
26 |
], |
|
27 |
rules: { |
|
28 |
'vue/no-setup-props-destructure': 'off', |
|
29 |
'vue/script-setup-uses-vars': 'error', |
|
30 |
'vue/no-reserved-component-names': 'off', |
|
31 |
'@typescript-eslint/ban-ts-ignore': 'off', |
|
32 |
'@typescript-eslint/explicit-function-return-type': 'off', |
|
33 |
'@typescript-eslint/no-explicit-any': 'off', |
|
34 |
'@typescript-eslint/no-var-requires': 'off', |
|
35 |
'@typescript-eslint/no-empty-function': 'off', |
|
36 |
'vue/custom-event-name-casing': 'off', |
|
37 |
'no-use-before-define': 'off', |
|
38 |
'@typescript-eslint/no-use-before-define': 'off', |
|
39 |
'@typescript-eslint/ban-ts-comment': 'off', |
|
40 |
'@typescript-eslint/ban-types': 'off', |
|
41 |
'@typescript-eslint/no-non-null-assertion': 'off', |
|
42 |
'@typescript-eslint/explicit-module-boundary-types': 'off', |
|
43 |
'@typescript-eslint/no-unused-vars': 'off', |
|
44 |
'no-unused-vars': 'off', |
|
45 |
'space-before-function-paren': 'off', |
|
46 |
|
|
47 |
'vue/attributes-order': 'off', |
|
48 |
'vue/one-component-per-file': 'off', |
|
49 |
'vue/html-closing-bracket-newline': 'off', |
|
50 |
'vue/max-attributes-per-line': 'off', |
|
51 |
'vue/multiline-html-element-content-newline': 'off', |
|
52 |
'vue/singleline-html-element-content-newline': 'off', |
|
53 |
'vue/attribute-hyphenation': 'off', |
|
54 |
'vue/require-default-prop': 'off', |
|
55 |
'vue/require-explicit-emits': 'off', |
|
56 |
'vue/require-toggle-inside-transition': 'off', |
|
57 |
'vue/html-self-closing': [ |
|
58 |
'error', |
|
59 |
{ |
|
60 |
html: { |
|
61 |
void: 'always', |
|
62 |
normal: 'never', |
|
63 |
component: 'always' |
|
64 |
}, |
|
65 |
svg: 'always', |
|
66 |
math: 'always' |
|
67 |
} |
|
68 |
], |
|
69 |
'vue/multi-word-component-names': 'off', |
|
70 |
'vue/no-v-html': 'off', |
|
71 |
'prettier/prettier': 'off', // 芋艿:默认关闭 prettier 的 ESLint 校验,因为我们使用的是 IDE 的 Prettier 插件 |
|
72 |
'@unocss/order': 'off', // 芋艿:禁用 unocss 【css】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐 |
|
73 |
'@unocss/order-attributify': 'off' // 芋艿:禁用 unocss 【属性】顺序的提示,因为暂时不需要这么严格,警告也有点繁琐 |
|
74 |
} |
|
75 |
}) |