|
1 | 1 | { |
2 | | - "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json", |
3 | | - "vcs": { |
4 | | - "enabled": true, |
5 | | - "clientKind": "git", |
6 | | - "useIgnoreFile": true |
7 | | - }, |
8 | | - "files": { |
9 | | - "includes": ["**", "!lib", "!.github/repo-platform-manifest.json"] |
10 | | - }, |
11 | | - "formatter": { |
12 | | - "enabled": true, |
13 | | - "includes": ["**", "!src/generated/upstream-gaps.ts"], |
14 | | - "indentStyle": "space", |
15 | | - "indentWidth": 2, |
16 | | - "lineWidth": 100 |
17 | | - }, |
| 2 | + "$schema": "https://biomejs.dev/schemas/2.5.11/schema.json", |
| 3 | + "extends": ["./biome.local.jsonc"], |
18 | 4 | "linter": { |
19 | 5 | "enabled": true, |
20 | 6 | "rules": { |
21 | | - "preset": "recommended", |
22 | | - "correctness": { |
23 | | - "noUnusedImports": "error", |
24 | | - "noUnusedVariables": "error" |
| 7 | + "complexity": { |
| 8 | + "noExcessiveCognitiveComplexity": { |
| 9 | + "level": "error", |
| 10 | + "options": { "maxAllowedComplexity": 15 } |
| 11 | + }, |
| 12 | + "noExcessiveLinesPerFunction": { "level": "error", "options": { "maxLines": 80 } }, |
| 13 | + "useMaxParams": { "level": "error", "options": { "max": 6 } } |
25 | 14 | }, |
26 | 15 | "style": { |
27 | | - "noNonNullAssertion": "error", |
28 | | - "noRestrictedImports": { |
29 | | - "level": "error", |
30 | | - "options": { |
31 | | - "paths": { |
32 | | - "@actions/core": "Only src/action/ implements the Io port over @actions/core; every other layer takes an Io." |
33 | | - }, |
34 | | - "patterns": [ |
35 | | - { |
36 | | - "group": ["**/private-open", "**/private-open.*"], |
37 | | - "message": "Only the redaction projections may open a Private<T> seal; render through publicDetail/toPublicView, or compose the private report." |
38 | | - } |
39 | | - ] |
40 | | - } |
41 | | - } |
42 | | - } |
43 | | - } |
44 | | - }, |
45 | | - "javascript": { |
46 | | - "formatter": { |
47 | | - "quoteStyle": "double" |
| 16 | + "noNestedTernary": "error", |
| 17 | + "noUselessElse": "error", |
| 18 | + "noNegationElse": "error", |
| 19 | + "noParameterAssign": "error" |
| 20 | + }, |
| 21 | + "suspicious": { "noAssignInExpressions": "error", "noUnusedExpressions": "error" }, |
| 22 | + "performance": { "noBarrelFile": "error", "noReExportAll": "error" }, |
| 23 | + "correctness": { "noInvalidUseBeforeDeclaration": "error" } |
48 | 24 | } |
49 | 25 | }, |
50 | 26 | "overrides": [ |
51 | 27 | { |
52 | | - "includes": ["src/generated/upstream-gaps.ts"], |
53 | | - "assist": { |
54 | | - "actions": { |
55 | | - "source": { |
56 | | - "organizeImports": "off" |
57 | | - } |
58 | | - } |
59 | | - } |
60 | | - }, |
61 | | - { |
62 | | - "includes": ["src/**"], |
63 | | - "plugins": ["./lint/never-throw.grit"] |
64 | | - }, |
65 | | - { |
66 | | - "includes": ["src/**", "!src/sections/shared/schema-helpers.ts"], |
67 | | - "plugins": ["./lint/rule-gate.grit"] |
68 | | - }, |
69 | | - { |
70 | | - "includes": ["src/action/**"], |
71 | | - "linter": { |
72 | | - "rules": { |
73 | | - "style": { |
74 | | - "noRestrictedImports": { |
75 | | - "level": "error", |
76 | | - "options": { |
77 | | - "patterns": [ |
78 | | - { |
79 | | - "group": ["**/private-open", "**/private-open.*"], |
80 | | - "message": "Only the redaction projections may open a Private<T> seal; render through publicDetail/toPublicView, or compose the private report." |
81 | | - } |
82 | | - ] |
83 | | - } |
84 | | - } |
85 | | - } |
86 | | - } |
87 | | - } |
88 | | - }, |
89 | | - { |
90 | | - "includes": ["src/flows/redact.ts"], |
91 | | - "linter": { |
92 | | - "rules": { |
93 | | - "style": { |
94 | | - "noRestrictedImports": "off" |
95 | | - } |
96 | | - } |
97 | | - } |
98 | | - }, |
99 | | - { |
100 | | - "includes": [ |
101 | | - "src/private.ts", |
102 | | - "src/discovery/discover.ts", |
103 | | - "src/report/delivery.ts", |
104 | | - "test/private.test.ts" |
105 | | - ], |
106 | | - "linter": { |
107 | | - "rules": { |
108 | | - "style": { |
109 | | - "noRestrictedImports": { |
110 | | - "level": "error", |
111 | | - "options": { |
112 | | - "paths": { |
113 | | - "@actions/core": "Only src/action/ implements the Io port over @actions/core; every other layer takes an Io." |
114 | | - } |
115 | | - } |
116 | | - } |
117 | | - } |
118 | | - } |
119 | | - } |
| 28 | + "includes": ["biome.json", ".github/repo-platform-manifest.json"], |
| 29 | + "formatter": { "enabled": false }, |
| 30 | + "assist": { "enabled": false } |
120 | 31 | } |
121 | 32 | ] |
122 | 33 | } |
0 commit comments