-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy patheslint.config.mjs
More file actions
63 lines (62 loc) · 1.85 KB
/
Copy patheslint.config.mjs
File metadata and controls
63 lines (62 loc) · 1.85 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
import securityPlugin from "eslint-plugin-security";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
{
files: ["src/**/*.ts"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
security: securityPlugin,
},
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
],
// Sort imports: type imports after value imports
"sort-imports": [
"error",
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
allowSeparatedGroups: true,
},
],
// Ban console.log in src/ (warn/error allowed). Warn-only to avoid blocking existing code.
"no-console": ["warn", { "allow": ["warn", "error"] }],
// Flag overly complex functions
"complexity": ["warn", 25],
// Keep functions reasonably sized
"max-lines-per-function": ["warn", { "max": 200, "skipBlankLines": true, "skipComments": true }],
// Discourage explicit any — warn first, escalate to error later.
"@typescript-eslint/no-explicit-any": "warn",
// Baseline security linting with low churn.
"security/detect-eval-with-expression": "error",
"security/detect-new-buffer": "error",
"security/detect-object-injection": "warn",
"security/detect-non-literal-fs-filename": "warn",
},
},
{
ignores: [
".claude/**",
".friday/**",
"artifacts/**",
"audit-fix/**",
"dist/**",
"managed-skills/**",
"node_modules/**",
"screenshots/**",
"test/**",
"tmp/**",
],
},
];