fix: drop dead globs from the lint scripts - #426
Merged
Conversation
`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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run lintcannot 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:src/**/*.tssrc/holds the C++ sources, zero.tsfileslib/**/*.tslib/index.d.ts, whicheslint.config.mjsalready excludes viaignores: ['**/*.d.ts']eslint 9 aborts on the first:
eslint 10 aborts on the second as well:
Either way the command never reaches the directories that actually hold TypeScript:
test/(3 files) andsamples/(8).After this change
npm run lintruns and reports 75 pre-existing violations (50 auto-fixable) - trailing whitespace, missing space before function parens, missing final newlines, plus some substantive ones likeno-promise-executor-returnand 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 lintinto CI once the violations are cleared, since nothing currently exercises it.🤖 Generated with Claude Code