@blundergoat/gruff-ts 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +123 -1
  2. package/CONTRIBUTING.md +32 -25
  3. package/README.md +55 -46
  4. package/SECURITY.md +18 -30
  5. package/UPGRADING.md +101 -0
  6. package/bin/gruff-ts +3 -0
  7. package/docs/README.md +11 -13
  8. package/docs/agent-hook.md +33 -24
  9. package/docs/ci-integration.md +38 -24
  10. package/docs/configuration.md +173 -71
  11. package/docs/dashboard.md +12 -13
  12. package/docs/output-formats.md +100 -25
  13. package/docs/philosophy.md +2 -2
  14. package/docs/reports-and-ci.md +14 -157
  15. package/docs/rules.md +140 -106
  16. package/package.json +10 -8
  17. package/src/analyser.ts +886 -282
  18. package/src/baseline-file.ts +867 -0
  19. package/src/baseline-identity.ts +463 -0
  20. package/src/baseline-options.ts +139 -34
  21. package/src/baseline.ts +85 -55
  22. package/src/blocks.ts +579 -364
  23. package/src/changed-regions.ts +414 -65
  24. package/src/check-ignore.ts +28 -13
  25. package/src/class-rules.ts +461 -302
  26. package/src/cli-program.ts +956 -166
  27. package/src/cli.ts +9 -2
  28. package/src/comment-rules.ts +277 -414
  29. package/src/comment-scanner.ts +363 -44
  30. package/src/complexity-metrics.ts +320 -0
  31. package/src/config-load-error.ts +17 -8
  32. package/src/config-parse.ts +291 -98
  33. package/src/config-preservation.ts +81 -26
  34. package/src/config.ts +778 -210
  35. package/src/constants.ts +7 -6
  36. package/src/context-doc-rules.ts +188 -61
  37. package/src/dashboard.ts +88 -23
  38. package/src/dead-code-rules.ts +153 -74
  39. package/src/discovery.ts +521 -148
  40. package/src/doc-rules.ts +592 -147
  41. package/src/duplicate-test-group-rules.ts +359 -0
  42. package/src/findings-helpers.ts +240 -89
  43. package/src/findings.ts +48 -24
  44. package/src/fixture-purpose-rules.ts +226 -48
  45. package/src/github-actions-event-guards.ts +331 -0
  46. package/src/github-actions-rules.ts +336 -106
  47. package/src/hook-contract.ts +708 -211
  48. package/src/init-config.ts +169 -114
  49. package/src/inline-suppressions.ts +340 -0
  50. package/src/limit-band.ts +56 -0
  51. package/src/line-rules.ts +331 -419
  52. package/src/migrate-config.ts +670 -0
  53. package/src/naming-pushers.ts +33 -107
  54. package/src/parsed-script.ts +1206 -0
  55. package/src/pillar-summary.ts +56 -40
  56. package/src/profiles.ts +97 -71
  57. package/src/project-config-rules.ts +335 -146
  58. package/src/project-rules.ts +237 -115
  59. package/src/public-exports.ts +284 -0
  60. package/src/report-html.ts +217 -85
  61. package/src/report-renderers.ts +864 -195
  62. package/src/rule-list.ts +166 -46
  63. package/src/rules.ts +100 -104
  64. package/src/safety-rules.ts +191 -132
  65. package/src/scoring.ts +255 -52
  66. package/src/security-flow-rules.ts +930 -109
  67. package/src/selectors.ts +169 -0
  68. package/src/sensitive-data-rules.ts +502 -375
  69. package/src/sensitive-exclusions.ts +435 -0
  70. package/src/source-text.ts +380 -148
  71. package/src/static-analysis-redundant-rules.ts +298 -41
  72. package/src/test-block-rules.ts +422 -228
  73. package/src/text-scans.ts +67 -9
  74. package/src/types.ts +222 -71
  75. package/tsconfig.json +2 -1
  76. package/src/process-exec-metadata.ts +0 -153
  77. package/src/test-fixtures.ts +0 -668
@@ -1,180 +1,37 @@
1
1
  # Reports And CI
2
2
 
3
- This guide covers output formats, exit codes, baselines, GitHub annotations, and
4
- the local dashboard.
3
+ This page used to cover reporting and CI in one place. Each topic now has its
4
+ own page, and the headings below are kept so older links still land somewhere
5
+ useful.
5
6
 
6
7
  ## Exit Codes
7
8
 
8
- `analyse` exits with:
9
-
10
- - `0` when the scan completed and no finding met `--fail-on`.
11
- - `1` when at least one finding met `--fail-on`.
12
- - `2` when diagnostics were produced, such as missing inputs or parse/config
13
- diagnostics.
14
-
15
- Parse diagnostics for TypeScript and JavaScript source use TypeScript's
16
- syntax-only parser, including TSX and JSX modes by extension. They do not run
17
- semantic typechecking.
18
-
19
- Examples:
20
-
21
- ```bash
22
- gruff-ts analyse . --fail-on=none
23
- gruff-ts analyse . --fail-on=error
24
- gruff-ts analyse . --fail-on=warning
25
- ```
9
+ See [Exit Codes](../README.md#exit-codes) in the README, and the
10
+ [hook guide](agent-hook.md#the-model) for `hook`'s own exit codes.
26
11
 
27
12
  ## Machine Output
28
13
 
29
- Full JSON report:
30
-
31
- ```bash
32
- gruff-ts analyse . --format=json --fail-on=none > gruff-report.json
33
- ```
34
-
35
- Hotspot summary:
36
-
37
- ```bash
38
- gruff-ts analyse . --format=hotspot --fail-on=none > gruff-hotspots.json
39
- ```
40
-
41
- Human scan digest:
42
-
43
- ```bash
44
- gruff-ts summary . --fail-on=none
45
- ```
46
-
47
- The summary output includes the scanned path, elapsed duration, total findings,
48
- per-pillar counts, top rules, and top file offenders.
49
-
50
- Schema strings:
51
-
52
- - `gruff.analysis.v2` for full analysis reports.
53
- - `gruff.baseline.v1` for baselines.
54
- - `gruff.hotspot.v1` for hotspot output.
55
-
56
- `gruff.analysis.v2` may include an optional `notes` array. Notes are non-fatal:
57
- they explain scan-surface limits without changing exit codes. `diagnostics`
58
- still owns exit `2`.
59
-
60
- Current note types:
61
-
62
- - `no-analysable-files` - a requested path existed but contributed no supported
63
- files, usually because ignore rules excluded everything under it.
64
- - `bounded-deep-scan` - a script file exceeded the deep-scan budget. It still
65
- counts as analysed and text-level rules still run, but deep TypeScript passes,
66
- parse diagnostics, and project-graph retention are skipped for that file.
67
-
68
- The deep-scan budget is `20,000` lines or `2,000,000` UTF-8 bytes, whichever
69
- limit is hit first. Text output prints notes in a `Notes:` block. JSON reports
70
- omit `notes` when there are no notes, so ordinary scans keep the same report
71
- shape.
14
+ JSON, hotspot, SARIF, and summary output, schema strings, notes, and the
15
+ deep-scan budget are in [Output Formats](output-formats.md).
72
16
 
73
17
  ## GitHub Actions
74
18
 
75
- Use GitHub annotation output in a workflow step:
76
-
77
- ```bash
78
- gruff-ts analyse . --format=github --fail-on=warning
79
- ```
80
-
81
- Changed-file modes:
82
-
83
- ```bash
84
- gruff-ts analyse . --diff=working-tree --format=github --fail-on=warning
85
- gruff-ts analyse . --diff=staged --format=github --fail-on=warning
86
- gruff-ts analyse . --diff=origin/main --format=github --fail-on=warning
87
- ```
88
-
89
- `--diff` filters findings to changed files after analysis.
90
-
91
- For SARIF consumers, write SARIF output from `analyse` and upload the generated
92
- file with your platform's code-scanning upload step:
93
-
94
- ```bash
95
- gruff-ts analyse . --format=sarif --fail-on=none > gruff.sarif
96
- ```
97
-
98
- For a strict security-oriented gate, bypass baselines and fail on error-severity
99
- findings:
100
-
101
- ```bash
102
- gruff-ts analyse . --no-baseline --fail-on=error
103
- ```
104
-
105
- This is useful when an adoption baseline exists for general quality debt but
106
- security and sensitive-data errors should still break CI.
19
+ Annotations, SARIF upload, quality gates, and diff scans are in
20
+ [CI Integration](ci-integration.md).
107
21
 
108
22
  ## Baselines
109
23
 
110
- Generate an adoption baseline:
111
-
112
- ```bash
113
- gruff-ts analyse . --generate-baseline gruff-baseline.json --fail-on=none
114
- ```
115
-
116
- Apply it in CI:
117
-
118
- ```bash
119
- gruff-ts analyse . --baseline gruff-baseline.json --fail-on=warning
120
- ```
121
-
122
- Skip automatic baseline discovery:
123
-
124
- ```bash
125
- gruff-ts analyse . --no-baseline --fail-on=none
126
- ```
127
-
128
- Review baseline diffs carefully. A baseline suppresses matching fingerprints, so
129
- unexpected additions can hide findings.
130
-
131
- `report` intentionally renders raw scan results and does not accept a
132
- `--baseline` option. Use `analyse` for baseline-aware machine output.
24
+ See [Baselines](ci-integration.md#baselines) in CI Integration, and
25
+ [Upgrading](../UPGRADING.md) to migrate a `0.5` baseline.
133
26
 
134
27
  ## HTML Reports
135
28
 
136
- Write a dark self-contained report:
137
-
138
- ```bash
139
- gruff-ts report . --output gruff-report.html
140
- ```
141
-
142
- Write report JSON:
143
-
144
- ```bash
145
- gruff-ts report . --format=json --output gruff-report.json
146
- ```
147
-
148
- `report` defaults to `--fail-on none`, making it suitable for local inspection
149
- and scheduled reporting. `analyse` and `summary` default to `--fail-on advisory`
150
- out of the box; override per-project by setting `minimumSeverity:` in
151
- `.gruff-ts.yaml`. See `docs/configuration.md` and ADR-004 for the precedence
152
- chain (CLI flag > config > binary default).
29
+ See [HTML](output-formats.md#html) in Output Formats.
153
30
 
154
31
  ## Dashboard
155
32
 
156
- Start the dashboard:
157
-
158
- ```bash
159
- gruff-ts dashboard --host 127.0.0.1 --port 8767 --project-root .
160
- ```
161
-
162
- The dashboard serves:
163
-
164
- - `/` - iframe shell and controls panel.
165
- - `/health` - plain `ok`.
166
- - `/scan?projectRoot=<path>&path=<path>` - report HTML for the selected scan.
167
-
168
- Keep the dashboard on loopback unless the network is trusted. The scan endpoint
169
- accepts filesystem paths through request parameters.
33
+ See [Dashboard](dashboard.md).
170
34
 
171
35
  ## Score History
172
36
 
173
- Append score history to a JSON file:
174
-
175
- ```bash
176
- gruff-ts analyse . --history-file .gruff-history.json --fail-on=none
177
- ```
178
-
179
- History files are local artifacts. Commit them only if your project explicitly
180
- wants trend data in version control.
37
+ See [Score History](ci-integration.md#score-history) in CI Integration.
package/docs/rules.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Rules
2
2
 
3
- `gruff-ts` exposes 120 rules across 11 pillars. This list is generated from the
4
- public rule catalogue used by `gruff-ts list-rules`; severity, confidence,
5
- thresholds, and option names are the defaults before project config overrides.
3
+ `gruff-ts` exposes 81 rules across 11 pillars. This list is maintained by hand
4
+ against the public rule catalogue used by `gruff-ts list-rules`; severity,
5
+ confidence, thresholds, and option names are the defaults before project config
6
+ overrides.
6
7
 
7
8
  The pillars are organised around one goal: making AI-generated code something a
8
9
  human who did not write it can verify by reading, trust as secure, and rely on as
@@ -18,31 +19,96 @@ Use the CLI when you need machine-readable metadata:
18
19
  gruff-ts list-rules --format=json
19
20
  ```
20
21
 
22
+ Every medium- and low-confidence rule carries reviewed false-positive guidance:
23
+ the code shapes that trip it without being the defect, and what to do about each
24
+ one. That guidance lives on the rule catalogue rather than in this list, so it
25
+ cannot drift from what the analyser actually ships. Read it per rule with
26
+ `gruff-ts list-rules <rule-id>`, or across the catalogue in the
27
+ `falsePositiveShapes` field of `--format=json`.
28
+
29
+ ## Confidence evidence
30
+
31
+ A rule's confidence follows its measured precision: high at an error-adjusted score of 0.85 or more, medium from 0.70, low below, and a raise needs the lower bound of its 95% interval to clear the new band. These default-on rules have no measurement that sets their confidence, so the value below is inherited, not measured:
32
+
33
+ | Rule | Confidence | Measurement |
34
+ |---|---|---|
35
+ | `dead-code.unused-private-method` | low | unmeasured |
36
+ | `design.circular-import` | medium | insufficient |
37
+ | `design.large-module-concentration` | medium | unmeasured |
38
+ | `design.package-bin-missing` | high | unmeasured |
39
+ | `design.package-bin-not-executable` | high | unmeasured |
40
+ | `docs.fixture-purpose-missing` | medium | insufficient |
41
+ | `docs.missing-error-behavior-doc` | medium | insufficient |
42
+ | `modernisation.date-now-candidate` | high | unmeasured |
43
+ | `modernisation.readonly-property-candidate` | medium | insufficient |
44
+ | `modernisation.tsconfig-exact-optional-disabled` | high | insufficient |
45
+ | `modernisation.tsconfig-index-safety-disabled` | high | insufficient |
46
+ | `modernisation.tsconfig-strict-disabled` | high | insufficient |
47
+ | `naming.class-file-mismatch` | medium | insufficient |
48
+ | `security.async-foreach` | medium | unmeasured |
49
+ | `security.document-write` | high | too-few |
50
+ | `security.dynamic-regexp` | medium | unmeasured |
51
+ | `security.eval-call` | high | insufficient |
52
+ | `security.github-actions-pull-request-target` | medium | too-few |
53
+ | `security.github-actions-remote-shell` | medium | too-few |
54
+ | `security.github-actions-secrets-in-pr` | medium | too-few |
55
+ | `security.remote-install-script` | medium | unmeasured |
56
+ | `security.ssrf-candidate` | medium | too-few |
57
+ | `security.string-timer` | high | unmeasured |
58
+ | `security.weak-crypto` | high | too-few |
59
+ | `security.xxe-candidate` | medium | unmeasured |
60
+ | `sensitive-data.api-key-pattern` | high | unmeasured |
61
+ | `sensitive-data.gcp-service-account-key` | high | too-few |
62
+ | `sensitive-data.phi-pattern` | high | unmeasured |
63
+ | `sensitive-data.pii-pattern` | high | too-few |
64
+ | `sensitive-data.private-key` | high | too-few |
65
+ | `test-quality.static-analysis-redundant-test` | high | unmeasured |
66
+ | `test-quality.trivial-assertion` | high | unmeasured |
67
+ | `test-quality.unused-mock` | medium | unmeasured |
68
+ | `waste.broad-runtime-version` | medium | unmeasured |
69
+ | `waste.unreachable-code` | high | unmeasured |
70
+ | `waste.unused-import` | medium | insufficient |
71
+ | `waste.useless-catch` | high | unmeasured |
72
+
21
73
  Generated source policy: a file whose first 10 lines include an explicit marker
22
74
  such as `AUTO-GENERATED`, `@generated`, `Generated by`, `DO NOT EDIT`, or
23
75
  `Copied from` skips documentation and naming findings only. All other pillars,
24
76
  including security, sensitive-data, size, complexity, and test-quality, still
25
- run. A path segment such as `fixtures`, `testdata`, or `perf-tests` does not by
26
- itself suppress any rule family.
77
+ run. Directory names alone never trigger this generated-file skip; separately,
78
+ security and sensitive-data rules skip test, fixture, and example paths (`test`,
79
+ `tests`, `__tests__`, `spec`, `testdata`, `fixtures`, `examples`, and
80
+ `*.test.*`/`*.spec.*` files) with counted `source: "built-in"` audit rows.
27
81
 
28
82
  ## Pillar Counts
29
83
 
30
- - complexity: 2
84
+ - complexity: 1
31
85
  - dead-code: 1
32
- - design: 5
33
- - documentation: 18
34
- - maintainability: 14
35
- - modernisation: 14
36
- - naming: 10
37
- - security: 29
38
- - sensitive-data: 10
86
+ - design: 4
87
+ - documentation: 15
88
+ - maintainability: 8
89
+ - modernisation: 9
90
+ - naming: 3
91
+ - security: 23
92
+ - sensitive-data: 8
39
93
  - size: 3
40
- - test-quality: 14
94
+ - test-quality: 6
95
+
96
+ **Two bands for size and complexity.** Every `size.*` and `complexity.*` finding
97
+ reports in one of two bands. Below 1.5x its limit, it reports as an `advisory`
98
+ notice regardless of configured severity, sets `metadata.limitBand: "lower"`,
99
+ and advises not to grow the unit further. At 1.5x the limit or above, it keeps
100
+ its configured severity, sets `metadata.limitBand: "upper"`, and advises
101
+ splitting or simplifying. The message text stays identical across both bands so
102
+ the finding keeps its identity if the unit crosses the boundary, and the hook
103
+ payload includes the band beside its measurement. Findings do not suggest raising
104
+ a limit; adjust `rules.<id>.threshold` in `.gruff-ts.yaml` when a project needs
105
+ a different bound (see [Configuration](configuration.md)).
41
106
 
42
107
  ## Complexity
43
108
 
44
- - `complexity.cognitive` (warning; high confidence; threshold 15): Flags functions with high combined branch and nesting complexity.
45
- - `complexity.cyclomatic` (warning; high confidence; threshold 15): Flags functions with many independent branch paths.
109
+ - `complexity.cyclomatic` (warning; high confidence; threshold 15; off by default since 0.6.0): Starts at one, then counts each `if`, loop, `catch`, ternary, `&&`, and `||` syntax node once, and each `switch` with a non-default `case` once however many cases it has; `metadata.breakdown.case` counts those switches. `default`, `??`, optional property/element/call chains, and non-null assertions add zero.
110
+
111
+ `complexity.cyclomatic` shares its parsed callable measurement with `docs.missing-why-for-complex-code`. Alongside declared functions, methods, and `const`/`let` function values, the complexity and function-size rules also measure four extra forms: object-literal `key: function` methods, member-assigned functions (`Calendar.render = function () {}`), `var` function expressions, and immediately invoked functions (named after the key - qualified by its object variable or assignment target, as in `Widget.paint` - the member, the variable, or the invoked function's name / `<iife>`). Documentation and naming rules ignore those four forms. Any nested callable that already has its own block is measured separately; anonymous callbacks stay part of their enclosing owner. Findings include `metadata.complexity`, `metadata.threshold`, and `metadata.breakdown` (`if`, `loop`, `catch`, `case`, `ternary`, `logicalAnd`, `logicalOr`, `maxNesting`).
46
112
 
47
113
  ## Dead Code
48
114
 
@@ -50,45 +116,51 @@ itself suppress any rule family.
50
116
 
51
117
  ## Design
52
118
 
53
- - `design.circular-import` (warning; medium confidence): Flags strongly connected relative import components. Each component reports once, anchored on the lexicographically first member path, with sorted member paths and a representative cycle path in metadata. Narrow path scans build root graph context for this rule only, then emit SCCs that include a requested file; per-file rules and `paths.analysedFiles` remain scoped to the requested paths.
54
- - `design.deep-relative-import` (advisory; medium confidence; threshold 2): Flags relative imports that climb too many parent directories.
55
- - `design.large-module-concentration` (advisory; medium confidence; threshold 55; options: minFiles, minLines): Flags a production module that dominates project source lines.
56
- - `design.package-bin-missing` (warning; high confidence): Flags package bin entries that point at missing files.
119
+ - `design.circular-import` (warning; medium confidence): Flags strongly connected relative import components (SCCs). Each component reports once on its lexicographically first member path, with sorted members and a representative cycle path in metadata. Narrow path scans build root graph context for this rule only and emit SCCs touching a requested file, keeping per-file rules and `paths.analysedFiles` scoped to the request.
120
+ - `design.large-module-concentration` (advisory; medium confidence; threshold 55; options: minFiles, minLines): Flags a production module that dominates project source lines. The share counts code lines only: blank, comment-only and decorator-only lines do not count.
121
+ - `design.package-bin-missing` (warning; high confidence): Flags package bin entries that point at missing files; unbuilt `dist/`, `build/`, or `lib/` targets in packages with a `build` script report as `advisory` (even when config sets `warning`).
57
122
  - `design.package-bin-not-executable` (warning; high confidence): Flags package bin targets that are not executable.
58
123
 
59
124
  ## Documentation
60
125
 
61
- - `docs.fixture-purpose-missing` (advisory; medium confidence): Flags large or scanner-relevant fixtures without a nearby purpose comment.
62
- - `docs.magic-threshold-without-rationale` (advisory; medium confidence): Flags threshold-like numeric values without a nearby rationale comment.
63
- - `docs.missing-error-behavior-doc` (advisory; medium confidence): Flags commented functions whose error behavior is not described.
64
- - `docs.missing-exported-function-doc` (warning; medium confidence): Flags exported functions without a leading maintainer comment.
126
+ - `docs.fixture-purpose-missing` (advisory; medium confidence): Flags large or scanner-relevant fixtures without a nearby purpose comment. A comment on or directly above the fixture (or above the test declaration for setup findings) clears it when it uses the purpose vocabulary or is a substantive explanation of eight or more words; stacked `//` headers count as one comment.
127
+ - `docs.missing-error-behavior-doc` (advisory; medium confidence): Flags commented functions whose body contains `throw` and whose comment has no `@throws` tag. Describing the error in other words does not stand in for the tag.
128
+ - `docs.missing-exported-function-doc` (warning; medium confidence): Flags exported functions without a leading maintainer comment; with `everyCallable` on either JSDoc tag rule, also public methods of exported classes.
65
129
  - `docs.missing-file-overview` (advisory; medium confidence): Flags source files without a top-of-file purpose comment.
66
130
  - `docs.missing-interface-doc` (advisory; medium confidence): Flags interfaces without a leading maintainer comment.
67
131
  - `docs.missing-internal-function-doc` (advisory; medium confidence): Flags internal helper functions without a leading maintainer comment.
68
- - `docs.missing-invariant-doc` (advisory; medium confidence): Flags commented declarations that own schema, fingerprint, baseline, or determinism contracts without saying so.
69
- - `docs.missing-param-tag` (advisory; medium confidence): Flags documented exports with parameters missing @param tags.
132
+ - `docs.missing-invariant-doc` (advisory; medium confidence): Flags commented declarations that own schema, fingerprint, baseline, or determinism contracts without saying so. Off by default, because its keyword list cannot accept an accurate comment written in other words: enable it with `rules.docs.missing-invariant-doc.enabled: true`.
133
+ - `docs.missing-param-tag` (advisory; medium confidence; options: everyCallable): Flags non-test documented exports with parameters missing `@param` tags; with `everyCallable`, requires `/** ... */` JSDoc blocks with described `@param` tags across all non-test callables (private and nested functions, class and object methods, default and later exports, single `const` function values, and slash- or block-commented helpers), skipping test files while keeping fixture directories checked.
70
134
  - `docs.missing-public-doc` (advisory; medium confidence): Flags exported class, type, and enum APIs without a nearby doc comment.
71
- - `docs.missing-return-tag` (advisory; medium confidence): Flags documented non-void exports without @returns.
72
- - `docs.missing-side-effect-doc` (advisory; medium confidence): Flags commented functions that perform observable side effects without naming them.
73
- - `docs.missing-why-for-complex-code` (advisory; medium confidence): Flags comments on complex functions that do not explain why the shape exists.
74
- - `docs.stale-comment` (advisory; medium confidence): Flags comments that reference missing files, unknown rules, stale CLI flags, or the wrong declaration.
75
- - `docs.stale-param-tag` (advisory; medium confidence): Flags @param tags for parameters no longer in the signature.
76
- - `docs.suppression-without-rationale` (advisory; medium confidence): Flags lint, formatter, coverage, or tool suppressions without a maintainer rationale.
77
- - `docs.todo-without-tracking` (advisory; high confidence): Flags TODO, FIXME, HACK, and XXX comments without tracking context.
78
- - `docs.useless-docblock` (advisory; medium confidence): Flags comments or docblocks that only restate the symbol name.
135
+ - `docs.missing-return-tag` (advisory; medium confidence; options: everyCallable): Flags non-test documented callables without a described `@returns` tag, including `void`, `Promise<void>`, `asserts`, `never`, and `undefined` (excluding constructors and setters); with `everyCallable`, requires `/** ... */` JSDoc blocks across all non-test callables including slash- and block-commented helpers, skipping test files while keeping fixture directories checked.
136
+ - `docs.missing-side-effect-doc` (advisory; medium confidence): Flags commented functions that perform observable side effects without naming them. Off by default, because its keyword list cannot accept an accurate comment written in other words: enable it with `rules.docs.missing-side-effect-doc.enabled: true`.
137
+ - `docs.missing-why-for-complex-code` (advisory; low confidence): Flags comments on complex non-test functions that do not explain why the shape exists (`it`/`test` callbacks are skipped). Accepted rationale vocabulary includes `because`, `why`, `intentional`, `tradeoff`/`trade-off`, `compat`/`compatible`/`compatibility`, `avoid`, and `preserve`, plus the phrases `due to`, `so that`, `in order to`, and `required by`. A contiguous run of leading `//` lines is evaluated as one comment; block comments are already evaluated as one body.
138
+ - `docs.stale-param-tag` (advisory; medium confidence): Flags `@param` tags for parameters or destructured property keys no longer in the signature (accepting JSDoc object and matching dotted property tags for destructured parameters); with `everyCallable` on `docs.missing-param-tag`, covers all non-test documented callables.
139
+ - `docs.suppression-without-rationale` (advisory; low confidence): Flags lint, formatter, coverage, or tool suppressions without a maintainer rationale; the rationale may sit on the directive or in the comment lines directly above it.
140
+ - `docs.todo-without-tracking` (advisory; medium confidence): Flags comments introduced by a TODO, FIXME, HACK, or XXX marker without tracking context. The marker must start a comment body line (followed by `:`, `(`, `-`, whitespace, or end of line); quoted, backticked, mid-sentence, and fenced-example mentions are prose and stay quiet. A project's own tracking references count when they match a regular expression listed under `allowlists.trackingTokens`; gruff-ts ships no project-specific token.
141
+
142
+ ## Maintainability
143
+
144
+ Rule IDs in this pillar keep the `waste.` prefix. The pillar was renamed from
145
+ `waste` to `maintainability` in 0.1.1 and the IDs deliberately stayed put, so
146
+ existing config overrides and baselines keep matching.
147
+
148
+ - `waste.any-type` (warning; medium confidence): Flags any type usage.
149
+ - `waste.broad-runtime-version` (advisory; medium confidence): Flags broad runtime dependency version ranges.
150
+ - `waste.exported-any` (warning; medium confidence): Flags exported APIs exposing any.
151
+ - `waste.swallowed-catch` (warning; medium confidence): Flags empty catch blocks with no comment that gives a reason. A comment of two or more words, a rationale or tracking reference (including a match for `allowlists.trackingTokens`), or an intent marker (`ignore`/`ignored`, `no-op`, `cleanup`, `teardown`, `best-effort`, `non-fatal`, `optional`) clears it; a one-word label such as `/* silent */`, or a comment holding `TODO`, `FIXME` or `XXX`, still reports. Off by default, because a measured sample stayed under the waste floor: enable it with `rules.waste.swallowed-catch.enabled: true`.
152
+ - `waste.unreachable-code` (warning; high confidence): Flags statements after terminating statements.
153
+ - `waste.unused-import` (advisory; medium confidence): Flags named imports with no apparent usage, resolving inline `type` modifiers, aliases, and `$`-bearing identifiers through the TypeScript AST.
154
+ - `waste.useless-catch` (advisory; high confidence): Flags catch blocks that only rethrow the caught value.
155
+ - `waste.useless-return` (advisory; medium confidence): Flags terminal bare return statements in void functions. A bare `return;` that is the only statement of a `catch` block is not reported. Off by default since 0.6.0, because its 0.6.0 precision sample did not establish the floor: enable it with `rules.waste.useless-return.enabled: true`.
79
156
 
80
157
  ## Modernisation
81
158
 
82
159
  - `modernisation.date-now-candidate` (advisory; high confidence): Flags verbose current-time expressions that can use Date.now().
83
160
  - `modernisation.double-cast` (warning; medium confidence): Flags casts through unknown or any into another type.
84
- - `modernisation.loose-equality` (advisory; medium confidence): Flags loose equality comparisons that may coerce values.
85
161
  - `modernisation.non-null-assertion` (warning; medium confidence): Flags non-null assertions that bypass null checks.
86
- - `modernisation.nullish-coalescing-candidate` (advisory; medium confidence): Flags || fallbacks that may erase valid falsy values.
87
- - `modernisation.object-spread-candidate` (advisory; medium confidence): Flags Object.assign({}, ...) cloning that can use object spread.
88
- - `modernisation.optional-chaining-candidate` (advisory; medium confidence): Flags repeated guard-and-property access patterns.
89
- - `modernisation.public-property` (advisory; high confidence): Flags public class properties that expose representation.
90
- - `modernisation.readonly-property-candidate` (advisory; medium confidence): Flags class properties that appear readonly-worthy.
91
- - `modernisation.ts-comment-without-rationale` (warning; medium confidence): Flags TypeScript suppression comments without a rationale.
162
+ - `modernisation.readonly-property-candidate` (advisory; medium confidence): Flags private class fields their class assigns only in its own constructor, so marking them `readonly` compiles. Public and protected fields are not reported, because another file can write them. Nor is a field the class writes anywhere else, including another instance's field and a callback inside the constructor, any field of a class that writes through `this[...]` or `Object.assign(this, ...)`, or any field in a file that does not parse cleanly.
163
+ - `modernisation.ts-comment-without-rationale` (warning; medium confidence): Flags TypeScript suppression comments without a rationale; the rationale may follow the `@ts-` directive or sit in the `//` comment lines directly above it, and a match for `allowlists.trackingTokens` counts as one.
92
164
  - `modernisation.tsconfig-exact-optional-disabled` (warning; high confidence): Flags tsconfig files without exactOptionalPropertyTypes enabled.
93
165
  - `modernisation.tsconfig-index-safety-disabled` (warning; high confidence): Flags tsconfig files without noUncheckedIndexedAccess enabled.
94
166
  - `modernisation.tsconfig-strict-disabled` (warning; high confidence): Flags tsconfig files without strict mode enabled.
@@ -96,16 +168,9 @@ itself suppress any rule family.
96
168
 
97
169
  ## Naming
98
170
 
99
- - `naming.acronym-case` (advisory; medium confidence): Flags mixed casings of a known acronym in one file.
100
- - `naming.boolean-prefix` (advisory; medium confidence; allowlists: booleanPrefixes, acceptedBooleanNames): Flags boolean names without intent-revealing prefixes on declarations, function parameters (typed `: boolean` or with `= true|false` default), and interface/type-literal fields.
101
- - `naming.class-file-mismatch` (advisory; medium confidence): Flags exported classes whose name differs from the file name.
102
- - `naming.generic-function` (advisory; high confidence): Flags generic function names that hide intent.
103
- - `naming.generic-parameter` (advisory; medium confidence; options: minCyclomatic, minLineCount, minParameters): Flags placeholder parameter names in multi-parameter, long, exported, or complex functions.
104
- - `naming.hungarian-notation` (advisory; medium confidence): Flags identifiers named after storage type prefixes.
105
- - `naming.identifier-quality` (advisory; medium confidence): Flags placeholder or numbered identifiers on declarations, function parameters, and destructured locals.
106
- - `naming.inconsistent-casing` (advisory; medium confidence): Flags the same canonical identifier appearing in two different surface forms (for example CONSTANT_CASE and camelCase) in one file.
107
- - `naming.negative-boolean` (advisory; medium confidence): Flags boolean identifiers framed as a negation on declarations, parameters, and interface fields.
108
- - `naming.short-variable` (advisory; medium confidence): Flags very short variable names outside common loop counters; covers declarations, function parameters, and destructured locals.
171
+ - `naming.class-file-mismatch` (advisory; medium confidence; allowlist: acceptedClassFilePairs): Flags a named class whose normalized name differs from the file only when it is the module's sole supported public declaration. Direct exports, named default exports, and bottom re-exports share one syntax inventory; a public class beside an interface, type, enum, function, default value, or external re-export stays quiet. Exact case-insensitive `fileBase:ClassName` entries preserve intentional feature-file/class-role conventions. Retained findings include `candidatePrimaryExport: true` and sorted `publicExports` metadata.
172
+ - `naming.identifier-quality` (advisory; low confidence): Flags placeholder or numbered identifiers on declarations, function parameters, and destructured locals.
173
+ - `naming.short-variable` (advisory; medium confidence): Flags very short variable names outside common loop counters; covers declarations, function parameters, and destructured locals, while exempting `t` when typed as `TestContext` or inside test files.
109
174
 
110
175
  ## Security
111
176
 
@@ -113,83 +178,52 @@ itself suppress any rule family.
113
178
  - `security.disabled-tls-verification` (error; high confidence): Flags code that disables TLS certificate verification.
114
179
  - `security.document-write` (warning; high confidence): Flags document.write usage.
115
180
  - `security.dynamic-regexp` (warning; medium confidence): Flags external input used to construct regular expressions.
116
- - `security.eval-call` (error; high confidence): Flags eval() dynamic code execution.
117
- - `security.floating-promise` (warning; medium confidence): Flags promise-like calls without await, return, or void.
118
- - `security.github-actions-broad-permissions` (warning; medium confidence): Flags GitHub Actions workflows that grant broad write permissions.
181
+ - `security.eval-call` (error; high confidence): Flags eval() dynamic code execution. An `eval` whose only argument is one fixed string or a template without `${}` is not reported, unless another `eval` on the same line takes other input.
119
182
  - `security.github-actions-pull-request-target` (warning; medium confidence): Flags pull_request_target workflows paired with risky execution or trust context.
120
183
  - `security.github-actions-remote-shell` (warning; medium confidence): Flags workflow run steps that pipe remote downloads to a shell.
121
- - `security.github-actions-secrets-in-pr` (warning; medium confidence): Flags pull request workflows that reference GitHub secrets.
184
+ - `security.github-actions-secrets-in-pr` (warning; medium confidence): Flags pull_request_target workflows that reference repository secrets other than GITHUB_TOKEN. The trigger is read from the workflow's `on:` key; a plain `pull_request` run from a fork receives no secrets. An own job or step `if:` guard can silence a secret reference when exact `github.event_name` comparisons prove that scope unreachable for the detected PR event. Comparisons ignore case and support a whole expression wrapper, parentheses, negation, AND and OR. Unknown, malformed or unsupported guards and ambiguous YAML ownership retain warnings; a step guard cannot cover job/workflow env or siblings.
122
185
  - `security.github-actions-unpinned-action` (warning; medium confidence): Flags third-party GitHub Actions that are not pinned to a full commit SHA.
123
- - `security.inner-html` (warning; high confidence): Flags innerHTML assignment.
124
- - `security.insecure-random` (warning; high confidence): Flags Math.random usage in source.
125
- - `security.javascript-url` (error; high confidence): Flags javascript: URL literals that execute script.
186
+ - `security.inner-html` (warning; high confidence): Flags innerHTML assignment unless the value is a plain string or a template without substitutions. Off by default since 0.6.0, because its 0.6.0 precision sample did not establish the floor: enable it with `rules.security.inner-html.enabled: true`.
187
+ - `security.javascript-url` (error; high confidence): Flags javascript: URL literals that execute script; a literal compared with ==, ===, != or !== stays quiet.
126
188
  - `security.new-function` (error; high confidence): Flags Function constructor dynamic code execution.
127
- - `security.open-redirect-candidate` (warning; medium confidence): Flags external input sent to redirect or navigation sinks.
128
- - `security.path-traversal-candidate` (warning; medium confidence): Flags external input sent to filesystem path sinks.
129
- - `security.process-exec` (warning; high confidence): Flags child-process execution calls and annotates emitted findings with command-source and shell-mode hints.
130
- - `security.proto-access` (warning; medium confidence): Flags direct __proto__ access that can enable prototype pollution.
189
+ - `security.open-redirect-candidate` (warning; medium confidence): Flags external input sent to redirect or navigation sinks. Off by default (ADR-021): enable it with `rules.security.open-redirect-candidate.enabled: true`.
190
+ - `security.path-traversal-candidate` (warning; medium confidence): Flags external input sent to filesystem path sinks. Off by default since 0.6.0, because its 0.6.0 precision sample did not establish the floor: enable it with `rules.security.path-traversal-candidate.enabled: true`.
131
191
  - `security.remote-install-script` (error; medium confidence): Flags package scripts that pipe remote content to a shell.
132
- - `security.risky-lifecycle-script` (warning; medium confidence): Flags install-time and side-effectful publish lifecycle scripts while allowing validation-only publish gates.
133
- - `security.sql-concatenation` (warning; high confidence): Flags SQL text composed with runtime interpolation or concatenation in `query`, `execute`, `raw`, or `prepare` calls. Parameterized value placeholders stay quiet, but unknown runtime identifier interpolation such as table prefixes remains visible unless a project proves and documents a trusted source. The scanner is line-local and does not inspect multi-line SQL templates.
192
+ - `security.sql-concatenation` (warning; low confidence): Flags SQL text composed with runtime interpolation or concatenation in `query`, `execute`, `raw`, or `prepare` calls. Parameterized value placeholders stay quiet, but unknown runtime identifier interpolation such as table prefixes remains visible unless a project proves and documents a trusted source. The scanner is line-local and does not inspect multi-line SQL templates.
134
193
  - `security.ssrf-candidate` (warning; medium confidence): Flags external input sent to network request sinks.
135
194
  - `security.string-timer` (warning; high confidence): Flags string callbacks passed to timers.
136
195
  - `security.throw-non-error` (warning; medium confidence): Flags thrown non-Error values.
137
- - `security.unsafe-deserialization` (warning; medium confidence): Flags external input reaching unsafe deserialization or dynamic code-loading sinks.
196
+ - `security.unsafe-deserialization` (warning; medium confidence): Flags external input reaching unsafe deserialization or dynamic code-loading sinks. Bytes read by an imported, unshadowed Node `fs` call are not external input even when the input chose the file name. Off by default since 0.6.0, because no finding survived its 0.6.0 repair to measure: enable it with `rules.security.unsafe-deserialization.enabled: true`.
138
197
  - `security.url-dependency` (warning; medium confidence): Flags dependencies installed from URL, git, or local file specs.
139
- - `security.weak-crypto` (warning; high confidence): Flags weak crypto primitives such as md5, sha1, or createCipher.
198
+ - `security.weak-crypto` (warning; high confidence): Flags weak crypto primitives such as md5, sha1, or createCipher. An HMAC built on SHA-1, `createHmac("sha1", ...)`, is not reported; an MD5 HMAC and MD5 or SHA-1 hashes still are.
140
199
  - `security.xxe-candidate` (warning; medium confidence): Flags external XML reaching parsers configured to expand entities.
141
200
 
142
201
  ## Sensitive Data
143
202
 
144
- Pattern detectors (AWS keys, API keys, credential URLs, JWTs) skip values carrying explicit fake markers inside the matched value itself (`EXAMPLE`, `REDACTED`, `PLACEHOLDER`, `CHANGEME`, or masked `****`/`XXXX` runs) - the canonical AWS documentation keys end in `EXAMPLE`. A test or fixture file path alone never suppresses a production-shaped secret.
203
+ Every sensitive-data rule skips test, fixture, and example paths (`test`, `tests`, `__tests__`, `spec`, `testdata`, `fixtures`, `examples`, and test-named files such as `*.test.*` and `*.spec.*`) and records each skip as a counted `source: "built-in"` audit row. Pattern detectors also skip 20 vendor-documented sample values (AWS example keys, the jwt.io sample token, Google's reCAPTCHA v2 test site key, and 14 test card numbers), stock local development database credentials on loopback or single-label hosts, and values carrying explicit fake markers (`EXAMPLE`, `REDACTED`, `PLACEHOLDER`, `CHANGEME`, or masked `****`/`XXXX` runs; AWS keys treat only a full 16-`X` body as masked).
145
204
 
146
- - `sensitive-data.api-key-pattern` (error; high confidence): Flags vendor API key patterns including GitHub, GitLab, npm, Google API, Slack, Discord, and Stripe/OpenAI-style keys.
147
- - `sensitive-data.aws-access-key` (error; high confidence): Flags AWS access key looking values.
148
- - `sensitive-data.database-url-password` (error; high confidence): Flags database and HTTP(S) URLs that include passwords or embedded credentials.
149
- - `sensitive-data.gcp-service-account-key` (error; high confidence): Flags GCP service-account key files (type service_account alongside a private key).
150
- - `sensitive-data.hardcoded-env-value` (error; medium confidence; threshold 16): Flags environment-style secret values committed in text. In script files (TS/JS) only quoted values count: an unquoted right-hand side is a code expression (schema builder, secret-provider plumbing), not an embedded literal.
151
- - `sensitive-data.high-entropy-string` (error; medium confidence; threshold 32): Flags high-entropy string literals that may be secrets. Identifier-shaped values that decompose entirely into short dictionary-like word segments (dotted namespaces such as `Com.Example2.Services.TokenProvider`, underscored constants, slug-like catalog names) are exempt because credential alphabets interleave case and digits rather than forming words; JWTs and 20+ char mixed-case segments never earn the exemption. Character-set enumerations (a 10+ run of consecutive code points, e.g. base64 translation alphabets) are also exempt.
152
- - `sensitive-data.jwt-token` (error; high confidence): Flags JWT-looking token literals.
153
- - `sensitive-data.phi-pattern` (error; high confidence): Flags PHI identifiers such as Medicare (MBI) and medical record numbers.
154
- - `sensitive-data.pii-pattern` (error; high confidence): Flags PII-like identifier patterns including SSN-shaped values and Luhn-valid payment cards. A bare unseparated digit run additionally needs card vocabulary on its line (statistics can pass Luhn by coincidence); separator-grouped numbers flag without context.
155
- - `sensitive-data.private-key` (error; high confidence): Flags private key block markers.
205
+ - `sensitive-data.api-key-pattern` (warning; high confidence): Flags vendor API key patterns including GitHub, GitLab, npm, Google API, Slack, Discord, and Stripe/OpenAI-style keys.
206
+ - `sensitive-data.aws-access-key` (warning; high confidence): Flags AWS access key looking values. Off by default since 0.6.0, because its 0.6.0 precision sample did not establish the floor: enable it with `rules.sensitive-data.aws-access-key.enabled: true`.
207
+ - `sensitive-data.database-url-password` (warning; high confidence): Flags database and HTTP(S) URLs that include passwords or embedded credentials. Off by default since 0.6.0, because its 0.6.0 precision sample did not establish the floor: enable it with `rules.sensitive-data.database-url-password.enabled: true`.
208
+ - `sensitive-data.gcp-service-account-key` (warning; high confidence): Flags GCP service-account key files (type service_account alongside a private key).
209
+ - `sensitive-data.jwt-token` (warning; high confidence): Flags JWT-looking token literals. Off by default (ADR-021): enable it with `rules.sensitive-data.jwt-token.enabled: true`.
210
+ - `sensitive-data.phi-pattern` (warning; high confidence): Flags PHI identifiers such as Medicare (MBI) and medical record numbers.
211
+ - `sensitive-data.pii-pattern` (warning; high confidence): Flags PII-like identifier patterns including SSN-shaped values and Luhn-valid payment cards. A bare unseparated digit run additionally needs card vocabulary on its line (statistics can pass Luhn by coincidence); separator-grouped numbers flag without context.
212
+ - `sensitive-data.private-key` (warning; high confidence): Flags private key block markers.
156
213
 
157
214
  ## Size
158
215
 
159
- - `size.file-length` (warning; high confidence; threshold 750): Flags files longer than the configured threshold.
160
- - `size.function-length` (warning; high confidence; threshold 200): Flags functions longer than the configured threshold.
161
- - `size.parameter-count` (warning; high confidence; threshold 7): Flags functions with too many parameters.
216
+ - `size.file-length` (error; high confidence; threshold 1000): Flags JavaScript and TypeScript files with more than 1000 substantive lines by default; JSON, YAML, TOML, XML and other data files are not measured. Blank lines, comment-only lines (`//`, `/* */`), a `#!` interpreter line and lines that hold only a TypeScript decorator do not count; lines containing other code still count. `metadata.lines` is the substantive count.
217
+ - `size.function-length` (warning; high confidence; threshold 200): Flags functions longer than the configured threshold, counted in code lines: blank, comment-only and decorator-only lines do not count.
218
+ - `size.parameter-count` (warning; medium confidence; threshold 7): Flags functions with too many parameters.
162
219
 
163
220
  ## Test Quality
164
221
 
165
- - `test-quality.conditional-logic` (advisory; high confidence): Flags tests with conditional logic.
166
- - `test-quality.exception-type-only` (advisory; high confidence): Flags tests that only assert exception type.
222
+ - `test-quality.duplicate-test-body` (advisory; low confidence; default-on): Flags groups of three or more tests in one container whose normalized bodies match and have at least three statements, recommending labelled table-driven rows (disable with `rules.test-quality.duplicate-test-body.enabled: false`). Identifiers, operations, modifier/options values, whitespace-bearing strings, key/index literals, decorator arguments, and nested type/function/class declarations stay exact while `const` bindings normalize; separate suites, shorter bodies, pairs, and existing table tests stay quiet. Review each member before consolidating.
167
223
  - `test-quality.global-state-mutation` (warning; high confidence): Flags tests mutating process or global runtime state.
168
- - `test-quality.loop-in-test` (advisory; high confidence): Flags loops inside test bodies.
169
- - `test-quality.magic-number-assertion` (advisory; medium confidence): Flags assertions against unexplained numeric literals.
170
- - `test-quality.mock-only-test` (advisory; high confidence): Flags tests that only verify mock interaction.
171
- - `test-quality.no-assertions` (warning; high confidence): Flags tests without apparent assertions.
172
- - `test-quality.no-throw-only-test` (advisory; high confidence): Flags tests that only assert code does not throw.
173
- - `test-quality.only-skip` (advisory; high confidence): Flags focused or skipped test markers.
174
- - `test-quality.sleep-in-test` (advisory; high confidence): Flags sleeps in tests.
175
- - `test-quality.snapshot-only-test` (advisory; high confidence): Flags tests that rely only on snapshots.
224
+ - `test-quality.loop-in-test` (advisory; medium confidence): Flags test-body loops whose assertions do not identify the failing iteration.
176
225
  - `test-quality.static-analysis-redundant-test` (advisory; high confidence): Flags tests that primarily assert code shape rather than behavior, with review guidance for importability sentinels.
177
226
  - `test-quality.trivial-assertion` (warning; high confidence): Flags tautological assertions.
178
227
  - `test-quality.unused-mock` (advisory; medium confidence): Flags mocks created but not used.
179
228
 
180
- ## Maintainability
181
-
182
- - `waste.any-type` (warning; high confidence): Flags any type usage.
183
- - `waste.broad-runtime-version` (advisory; medium confidence): Flags broad runtime dependency version ranges.
184
- - `waste.commented-out-code` (advisory; high confidence): Flags comments that appear to contain disabled code.
185
- - `waste.console-log` (advisory; high confidence): Flags console log/debug calls in source.
186
- - `waste.empty-function` (advisory; high confidence): Flags functions with no executable body.
187
- - `waste.exported-any` (warning; medium confidence): Flags exported APIs exposing any.
188
- - `waste.redundant-boolean-cast` (advisory; medium confidence): Flags redundant boolean casts in condition expressions.
189
- - `waste.redundant-variable` (advisory; medium confidence): Flags variables returned immediately after assignment.
190
- - `waste.swallowed-catch` (warning; medium confidence): Flags empty catch blocks.
191
- - `waste.unreachable-code` (warning; high confidence): Flags statements after terminating statements.
192
- - `waste.unused-import` (advisory; medium confidence): Flags named imports with no apparent usage.
193
- - `waste.unused-parameter` (advisory; medium confidence): Flags parameters with no apparent usage.
194
- - `waste.useless-catch` (advisory; high confidence): Flags catch blocks that only rethrow the caught value.
195
- - `waste.useless-return` (advisory; medium confidence): Flags terminal bare return statements in void functions.
229
+ Loop assertions identify a failing iteration either through a message referencing the loop binding or by asserting directly against that binding (including `for...of`, `for...in`, and C-style loops).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blundergoat/gruff-ts",
3
- "version": "0.4.0",
4
- "description": "Governs AI-generated code so a human can verify it: a TypeScript/JavaScript static analyzer - 120 rules across 11 quality pillars, SARIF output, baselines, and a local dashboard.",
3
+ "version": "0.6.0",
4
+ "description": "Governs AI-generated code so a human can verify it: a TypeScript/JavaScript static analyzer - 81 rules across 11 quality pillars, SARIF output, baselines, and a local dashboard.",
5
5
  "license": "MIT",
6
6
  "author": "Matthew Hansen (https://www.blundergoat.com/about)",
7
7
  "homepage": "https://github.com/blundergoat/gruff-ts#readme",
@@ -33,13 +33,14 @@
33
33
  "nodejs"
34
34
  ],
35
35
  "engines": {
36
- "node": ">=22"
36
+ "node": ">=22.12.0"
37
37
  },
38
38
  "type": "module",
39
39
  "files": [
40
40
  "bin/",
41
41
  "src/",
42
42
  "!src/**/*.test.ts",
43
+ "!src/test-fixtures.ts",
43
44
  "!src/fixtures/",
44
45
  "docs/",
45
46
  "!docs/releasing.md",
@@ -48,6 +49,7 @@
48
49
  "README.md",
49
50
  "LICENSE",
50
51
  "CHANGELOG.md",
52
+ "UPGRADING.md",
51
53
  "CONTRIBUTING.md",
52
54
  "SECURITY.md"
53
55
  ],
@@ -60,12 +62,12 @@
60
62
  "start-dev": "tsx src/cli.ts dashboard"
61
63
  },
62
64
  "dependencies": {
63
- "commander": "^14.0.2",
64
- "tsx": "^4.21.0",
65
- "typescript": "^5.9.3"
65
+ "commander": "^15.1.0",
66
+ "tsx": "^4.23.15",
67
+ "typescript": "^6.0.3"
66
68
  },
67
69
  "devDependencies": {
68
- "@blundergoat/goat-flow": "^1.6.4",
69
- "@types/node": "^25.0.0"
70
+ "@blundergoat/goat-flow": "^1.19.0",
71
+ "@types/node": "^22.20.7"
70
72
  }
71
73
  }