-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (58 loc) · 1.92 KB
/
eslint.config.js
File metadata and controls
62 lines (58 loc) · 1.92 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
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import security from "eslint-plugin-security"
import globals from "globals"
/**
* ESLint configuration for the debriefer monorepo.
* Aligned with deadonfilm server config: TypeScript ESLint + security plugin.
* @type {import('typescript-eslint').Config}
*/
export default tseslint.config(
// Global ignores
{
ignores: ["**/dist/", "**/node_modules/", "**/*.js", "!eslint.config.js"],
},
// Base configs
eslint.configs.recommended,
...tseslint.configs.recommended,
security.configs.recommended,
// All TypeScript files — shared settings
// Glob must match both root-level (`npx eslint packages/...`) and
// package-level (`cd packages/core && eslint src/`) invocations
{
files: ["**/src/**/*.ts"],
languageOptions: {
globals: {
...globals.node,
...globals.es2020,
},
},
rules: {
// Match deadonfilm: unused vars with underscore ignore
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
// Stricter than deadonfilm: enforce no-any in production
"@typescript-eslint/no-explicit-any": "error",
// Match deadonfilm server: error with warn/error allowed
"no-console": ["error", { allow: ["warn", "error"] }],
// Security: disable noisy object-injection rule (same as deadonfilm)
"security/detect-object-injection": "off",
},
},
// Test files — relaxed rules (same as deadonfilm)
{
files: ["**/__tests__/**/*.ts", "**/*.test.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"no-console": "off",
"security/detect-non-literal-fs-filename": "off",
"security/detect-non-literal-regexp": "off",
},
}
)