-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
eslint.config.mjs
71 lines (70 loc) · 2.1 KB
/
eslint.config.mjs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
import eslint from "@eslint/js";
import unocss from "@unocss/eslint-config/flat";
import pluginVue from "eslint-plugin-vue";
import globals from "globals";
import tsEslint from "typescript-eslint";
import vueParser from "vue-eslint-parser";
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
export default [
eslint.configs.recommended,
...tsEslint.configs.recommendedTypeChecked,
...pluginVue.configs["flat/recommended"],
unocss,
{
languageOptions: {
globals: {
...globals.node,
NodeJS: "writable",
__APP_VERSION__: "writable",
__APP_LICENSE__: "writable",
},
parser: vueParser,
parserOptions: {
parser: tsEslint.parser,
sourceType: "module",
extraFileExtensions: [".vue"],
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
ignores: [
"dist",
"node_modules",
"dist_electron",
"dist-electron",
"release",
"index.html",
"tools/**/*.js",
"uno.config.ts",
"vite.config.ts",
"*.d.ts",
],
rules: {
"no-console": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/require-await": "off",
"vue/multi-word-component-names": "off",
"vue/component-tags-order": [
"error",
{
order: [["script", "template"], "style"],
},
],
"vue/html-self-closing": "off",
"vue/html-indent": "off",
"vue/html-closing-bracket-newline": "off",
"vue/singleline-html-element-content-newline": "off",
},
},
];