-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
74 lines (73 loc) · 1.52 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";
import prettier from "eslint-config-prettier";
export default [
{
ignores: ["**/dist/", "**/.vitepress/cache"],
},
{
rules: {
"no-restricted-syntax": [
"warn",
"CallExpression[callee.name='debugInPlayMode']",
],
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/essential"],
{
files: ["*.vue", "**/*.vue"],
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: "module",
},
sourceType: "module",
globals: globals.browser,
},
},
{
files: [
"**/*.test.ts",
"**/*.test.js",
"**/test-utils/",
"**/*.test-helper.ts",
"**/setupTests.ts",
"**/setupTests.js",
],
languageOptions: {
globals: globals.jest,
},
},
{
files: ["scripts/*"],
languageOptions: { globals: { ...globals.node } },
},
{
files: ["packages/@dom-preview/server"],
languageOptions: { globals: globals.node },
},
{
files: ["packages/@dom-preview/ui"],
languageOptions: { globals: globals.browser },
},
{
files: ["**/*.cjs"],
languageOptions: { globals: globals.commonjs },
},
prettier,
{
rules: {
"no-console": "error",
},
},
{
files: ["**/examples/*.ts", "scripts/"],
rules: {
"no-console": "off",
},
},
];