-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
61 lines (59 loc) · 1.92 KB
/
eslint.config.js
File metadata and controls
61 lines (59 loc) · 1.92 KB
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
import { includeIgnoreFile } from "@eslint/compat"
import eslint from "@eslint/js"
import eslintConfigPrettier from "eslint-config-prettier"
import eslintPluginVue from "eslint-plugin-vue"
import globals from "globals"
import path from "node:path"
import { fileURLToPath } from "node:url"
import tseslint from "typescript-eslint"
import vueParser from "vue-eslint-parser"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, ".gitignore")
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...eslintPluginVue.configs["flat/recommended"],
includeIgnoreFile(gitignorePath),
{
files: ["**/*.{js,vue,ts,html}"],
rules: {
"no-unused-vars": "off",
"no-undef": "off",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "none",
caughtErrors: "none",
},
],
"vue/multi-word-component-names": ["off"],
// TODO: Remove these once this is fixed upstream.
// See: https://github.com/vuejs/eslint-plugin-vue/issues/2956
"@typescript-eslint/no-redundant-type-constituents": "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",
},
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.es2025,
},
parser: vueParser,
parserOptions: {
extraFileExtensions: [".vue"],
parser: tseslint.parser,
projectService: {
allowDefaultProject: ["*.js"],
},
tsconfigRootDir: __dirname,
},
},
},
eslintConfigPrettier,
)