-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
41 lines (40 loc) · 1.38 KB
/
Copy patheslint.config.js
File metadata and controls
41 lines (40 loc) · 1.38 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
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import astro from "eslint-plugin-astro";
import globals from "globals";
export default [
js.configs.recommended,
...tseslint.configs.recommended,
...astro.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
// Existing codebase patterns — warn don't block
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-require-imports": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"no-unused-vars": "off", // handled by typescript-eslint rule above
"no-empty": "warn",
// no-undef is unreliable with TypeScript — TS handles this
"no-undef": "off",
// Pre-existing escape patterns in source
"no-useless-escape": "warn",
// cookie-checker.js is intentionally disabled with an early return
"no-unreachable": "warn",
// Don't auto-fix let → const
"prefer-const": "off",
// Don't rewrite multiple spaces in regex to {n} quantifier
"no-regex-spaces": "off",
},
},
{
ignores: ["node_modules", "build", ".astro", "scripts", "public", "src/layouts/DocsLayout.astro"],
},
];