Lint the scripts directory
`scripts` sat in oxlint's ignorePatterns since c94c30e, grouped with
dist, coverage and .pnpm-store. Those are build artifacts; scripts holds
the quality gates themselves, which went unlinted as a result.
Removing it raises coverage from 265 to 273 files and surfaced four
findings:
prefer-regexp-exec in three files — swapped String#match for RegExp#exec.
All three patterns are non-global, where the two methods return the same
result, so behaviour is unchanged.
require-array-sort-compare in generate-bestiary-index.mjs — the rule
skips string arrays, and fired only because `new Set()` infers Set<any>.
Typed it Set<string>, which it already is, rather than adding a
comparator the bare sort does not need.
Also anchors the lint-gate probe's no-console canary to CLI scripts that
exist to write to the console, rather than to app error paths that could
reasonably be removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,7 @@ const files = readdirSync(BESTIARY_DIR).filter(
|
||||
);
|
||||
|
||||
const creatures = [];
|
||||
/** @type {Set<string>} */
|
||||
const unmappedSources = new Set();
|
||||
|
||||
for (const file of files.sort()) {
|
||||
|
||||
Reference in New Issue
Block a user