Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
81 lines (80 loc) · 1.88 KB
/
Copy patheslint.config.mjs
File metadata and controls
81 lines (80 loc) · 1.88 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"**/.venv/**",
"**/coverage/**",
"**/dist/**",
"**/node_modules/**",
"build/**",
".kilo/**",
"workspaces/**",
"deploy/**",
// The docs site (docs/site) is an isolated Astro Starlight app with its
// own tsconfig and `astro check`; it is not runtime code and is excluded
// from the runtime Docker image. Do not lint it with the runtime config.
"docs/site/**",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.mts"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.es2024,
...globals.node,
},
},
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
},
{
// Dashboard browser client (P6): plain ESM served verbatim to the
// browser; no Node APIs, DOM globals only.
files: ["packages/server/src/dashboard/client/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
},
},
},
{
files: ["**/*.mjs"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.node,
},
},
},
{
// CommonJS build scripts (e.g. packages/server/scripts/copy-assets.cjs).
files: ["**/*.cjs"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs",
globals: {
...globals.node,
},
},
rules: {
"@typescript-eslint/no-require-imports": "off",
},
},
);