Prefer lint:js for ESLint and annotate package.json lint failures - #41
Open
jeremyfelt wants to merge 1 commit into
Open
Prefer lint:js for ESLint and annotate package.json lint failures#41jeremyfelt wants to merge 1 commit into
jeremyfelt wants to merge 1 commit into
Conversation
The ESLint check resolved `lint` before `lint:js`. On several site builds `lint` is a composite that runs the CSS lint too, so Stylelint ran twice and its failures were reported under the ESLint check. `lint:js` is now preferred, with `lint` kept as the fallback for projects that only define it. npm-package-json-lint was the one check that failed without saying where. It has no GitHub reporter and names the offending package.json node rather than a line, so its output is now captured and mapped back onto the file, matching the annotations ESLint, Stylelint, PHPCS, and PHPStan already produce. Co-Authored-By: Claude Opus 5 (1M context) <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.
Two changes to
js-checks.yml, both from what the rollout across 58 repositories surfaced.Prefer
lint:jsoverlintThe ESLint check resolved
lintfirst. On the site buildslintis a composite —npm run lint:css && npm run lint:js— so Stylelint ran twice and a CSS failure was reported under the ESLint check. The order is nowlint:js lint, solintremains the fallback for projects that only define it.Annotate package.json lint failures
Every other check annotates the line it fails on. npm-package-json-lint was the exception: it has no GitHub reporter, and it reports the offending package.json node rather than a line number, so a failure said what was wrong but not where.
Its output is now captured and mapped back onto the file:
devDependencies are not in alphabetical orderannotates the"devDependencies"line.license is requiredhas nothing to point at, so it lands on line 1.✖/⚠orERROR/WARNING.working-directoryis respected, so the annotation path is relative to the repository root.Parsing was checked against real npm-package-json-lint output in both styles, including a nested working directory and the missing-node fallback.
🤖 Generated with Claude Code