-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
eslint.config.js
43 lines (41 loc) · 1.04 KB
/
eslint.config.js
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
import js from "@eslint/js"
import pluginVue from "eslint-plugin-vue"
import pluginPrettier from "eslint-config-prettier"
import globals from "globals"
import { includeIgnoreFile } from "@eslint/compat"
import path from "node:path"
import { fileURLToPath } from "node:url"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, ".gitignore")
export default [
js.configs.recommended,
...pluginVue.configs["flat/base"],
...pluginVue.configs["flat/recommended"],
pluginPrettier,
includeIgnoreFile(gitignorePath),
{
files: ["**/*.js", "**/*.vue", "**/*.ts"],
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
parser: "@babel/eslint-parser",
requireConfigFile: false,
sourceType: "module",
babelOptions: {
parserOpts: {
plugins: ["jsx", "flow"]
}
}
},
globals: {
...globals.browser,
...globals.node
}
},
rules: {
"vue/no-v-html": 0,
"no-unused-vars": ["error", { caughtErrors: "none" }]
}
}
]