Skip to content

fix: drop dead globs from the lint scripts - #426

Merged
TimelordUK merged 1 commit into
masterfrom
fix/lint-globs
Aug 20, 2026
Merged

fix: drop dead globs from the lint scripts#426
TimelordUK merged 1 commit into
masterfrom
fix/lint-globs

Conversation

@TimelordUK

Copy link
Copy Markdown
Owner

npm run lint cannot run today, on any eslint version. Two of its four globs match nothing lintable, and eslint treats an unmatched glob as a hard error rather than a no-op:

glob what it matches
src/**/*.ts nothing - src/ holds the C++ sources, zero .ts files
lib/**/*.ts only lib/index.d.ts, which eslint.config.mjs already excludes via ignores: ['**/*.d.ts']

eslint 9 aborts on the first:

No files matching the pattern "src/**/*.ts" were found.

eslint 10 aborts on the second as well:

You are linting "lib/**/*.ts", but all of the files matching the glob pattern "lib/**/*.ts" are ignored.

Either way the command never reaches the directories that actually hold TypeScript: test/ (3 files) and samples/ (8).

After this change

npm run lint runs and reports 75 pre-existing violations (50 auto-fixable) - trailing whitespace, missing space before function parens, missing final newlines, plus some substantive ones like no-promise-executor-return and unnecessary non-null assertions.

Those are deliberately left alone here. This commit only makes the command executable so the cleanup can be its own reviewable change.

Note on eslint versions

Verified against both eslint 9.39.4 / eslint-config-love 151.0.0 and eslint 10.8.1 / eslint-config-love 155.0.0 - identical output, 75 errors and 50 fixable on each. The version bump changes nothing about these results.

Worth wiring npm run lint into CI once the violations are cleared, since nothing currently exercises it.

🤖 Generated with Claude Code

`npm run lint` cannot run on any eslint version because two of its four
globs match nothing lintable, and eslint treats that as a hard error rather
than a no-op:

  src/**/*.ts  - src holds the C++ sources, zero .ts files
  lib/**/*.ts  - matches only lib/index.d.ts, which eslint.config.mjs
                 already excludes via ignores: ['**/*.d.ts']

eslint 9 aborted on the first, eslint 10 aborts on the second as well with
"all of the files matching the glob pattern are ignored". Either way the
command never reached the files that do have TypeScript: test/ and samples/.

With this fix `npm run lint` runs and reports 75 pre-existing violations
(50 auto-fixable). Those are left alone here - this commit only makes the
command executable, so the cleanup can be its own change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TimelordUK
TimelordUK merged commit a710362 into master Aug 20, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant