33 * @Author : ydfk
44 * @Date : 2021-08-24 21:36:55
55 * @LastEditors : ydfk
6- * @LastEditTime : 2022-04-20 10 :59:47
6+ * @LastEditTime : 2024-02-22 14 :59:14
77 */
8- // @ts -check
8+ // @ts -ignore
99const { defineConfig } = require ( "eslint-define-config" ) ;
10+
1011module . exports = defineConfig ( {
11- root : true ,
1212 env : {
1313 browser : true ,
1414 node : true ,
@@ -23,48 +23,54 @@ module.exports = defineConfig({
2323 ecmaFeatures : {
2424 jsx : true ,
2525 } ,
26+ project : "./tsconfig.*?.json" ,
27+ createDefaultProgram : false ,
28+ extraFileExtensions : [ ".vue" ] ,
2629 } ,
27- extends : [ "plugin:vue/vue3-recommended" , "plugin:@typescript-eslint/recommended" , "prettier" , "plugin:prettier/recommended" ] ,
30+ plugins : [ "vue" , "@typescript-eslint" , "import" ] ,
31+ extends : [ "eslint:recommended" , "plugin:vue/vue3-recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
2832 rules : {
29- "vue/script-setup-uses-vars" : "error" ,
33+ "no-undef" : "off" ,
34+ "no-useless-escape" : "off" ,
35+ "no-unused-vars" : "off" ,
36+ "no-case-declarations" : "off" ,
37+ "no-use-before-define" : "off" ,
38+ "space-before-function-paren" : "off" ,
39+
40+ "import/first" : "error" ,
41+ "import/newline-after-import" : "error" ,
42+ "import/no-duplicates" : "error" ,
43+
44+ // "@typescript-eslint/no-unused-vars": [
45+ // "error",
46+ // {
47+ // argsIgnorePattern: "^_",
48+ // varsIgnorePattern: "^_",
49+ // },
50+ // ],
51+ "@typescript-eslint/no-unused-vars" : "off" ,
3052 "@typescript-eslint/ban-ts-ignore" : "off" ,
53+ "@typescript-eslint/ban-ts-comment" : "off" ,
54+ "@typescript-eslint/ban-types" : "off" ,
3155 "@typescript-eslint/explicit-function-return-type" : "off" ,
3256 "@typescript-eslint/no-explicit-any" : "off" ,
3357 "@typescript-eslint/no-var-requires" : "off" ,
3458 "@typescript-eslint/no-empty-function" : "off" ,
35- "vue/custom-event-name-casing" : "off" ,
36- "no-use-before-define" : "off" ,
3759 "@typescript-eslint/no-use-before-define" : "off" ,
38- "@typescript-eslint/ban-ts-comment" : "off" ,
39- "@typescript-eslint/ban-types" : "off" ,
4060 "@typescript-eslint/no-non-null-assertion" : "off" ,
4161 "@typescript-eslint/explicit-module-boundary-types" : "off" ,
42- "@typescript-eslint/no-unused-vars" : [
43- "warn" ,
44- {
45- argsIgnorePattern : "^_" ,
46- varsIgnorePattern : "^_" ,
47- } ,
48- ] ,
49- "no-unused-vars" : [
50- "warn" ,
51- {
52- argsIgnorePattern : "^_" ,
53- varsIgnorePattern : "^_" ,
54- } ,
55- ] ,
56- "space-before-function-paren" : "off" ,
57-
58- "vue/no-setup-props-destructure" : "off" ,
62+ "vue/script-setup-uses-vars" : "error" ,
63+ "vue/no-reserved-component-names" : "off" ,
64+ "vue/custom-event-name-casing" : "off" ,
5965 "vue/attributes-order" : "off" ,
6066 "vue/one-component-per-file" : "off" ,
6167 "vue/html-closing-bracket-newline" : "off" ,
6268 "vue/max-attributes-per-line" : "off" ,
6369 "vue/multiline-html-element-content-newline" : "off" ,
64- "vue/multi-word-component-names" : "off" ,
6570 "vue/singleline-html-element-content-newline" : "off" ,
6671 "vue/attribute-hyphenation" : "off" ,
6772 "vue/require-default-prop" : "off" ,
73+ "vue/require-explicit-emits" : "off" ,
6874 "vue/html-self-closing" : [
6975 "error" ,
7076 {
@@ -77,11 +83,17 @@ module.exports = defineConfig({
7783 math : "always" ,
7884 } ,
7985 ] ,
80- "prettier/prettier" : [
81- "error" ,
82- {
83- singleQuote : false ,
84- } ,
85- ] ,
86+ "vue/multi-word-component-names" : "off" ,
87+ // 'sort-imports': [
88+ // 'error',
89+ // {
90+ // ignoreCase: true,
91+ // ignoreDeclarationSort: false,
92+ // ignoreMemberSort: false,
93+ // memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
94+ // allowSeparatedGroups: false,
95+ // },
96+ // ],
8697 } ,
98+ globals : { defineOptions : "readonly" } ,
8799} ) ;
0 commit comments