-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy patheslint.config.js
49 lines (48 loc) · 1.05 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
44
45
46
47
48
49
import vitest from "eslint-plugin-vitest";
import pluginVue from "eslint-plugin-vue";
import eslintConfigPrettier from "eslint-config-prettier";
import js from "@eslint/js";
import globals from "globals";
export default [
...pluginVue.configs["flat/recommended"],
js.configs.recommended,
eslintConfigPrettier,
{
env: {
"vitest/env": true,
},
files: ["**/*.js,**/*.vue,**/*.cjs"],
plugins: {
vitest,
},
rules: {
...vitest.configs.recommended.rules,
"vitest/max-nested-describe": ["error", { max: 3 }],
},
},
{
rules: {
"no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
ignoreRestSiblings: false,
argsIgnorePattern: "^_",
},
],
},
},
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
// Globals to ensure we don't violate no-undef
...vitest.environments.env.globals,
...globals.browser,
...globals.node,
},
},
},
];