Repository navigation
chore: move to eslint 10 and neostandard - #60
Open
xiaodoudou wants to merge 1 commit into
Open
xiaodoudou wants to merge 1 commit into
xiaodoudou wants to merge 1 commit into
Conversation
eslint-config-standard never supported flat config, so this swaps it for neostandard, which bundles the n, promise and stylistic plugins, and replaces .eslintrc.json with eslint.config.js. eslint 10.14.0 still depends on minimatch ^10, and GHSA-g3hv-75wg-m249 covers every version before 11.0.1, so minimatch is overridden to ^11.0.1. eslint, @eslint/config-array and typescript-estree only use new Minimatch() and .match(), which 11 keeps. The rules match the old config: renamed rules carry over, the dropped import/* rules only apply to ES imports, and dot-notation, comma-dangle and n/no-deprecated-api are set back to errors.
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.
Stacked on #59. This clears the last
npm auditfinding: minimatch before 11.0.1 (moderate, GHSA-g3hv-75wg-m249), which came in through eslint 8 and its plugins.Moving to eslint 10 on its own doesn't fix it. eslint 10.14.0,
@eslint/config-arrayandtypescript-estreeall still ask for minimatch^10, and the advisory has no 10.x patch. Sopackage.jsongets anoverridesentry forcing minimatch^11.0.1. 11.0 removedmakeRe(),.regexp,matchOne()and theASTclass, but those three packages only callnew Minimatch()and.match(), which are still there.eslint-config-standardnever supported flat config, so it's replaced byneostandard, which bundles the n, promise and stylistic plugins. That takes the dev dependencies from five eslint packages down toeslintandneostandard, and.eslintrc.jsonbecomeseslint.config.js.The rules are the same as before, checked by diffing
--print-configagainst the old setup:func-call-spacing,no-new-objectandno-new-symbolcarry over under their new namesimport/*rules are gone, but they only look at ESimportstatements and this code usesrequiredot-notationand only warns oncomma-dangleandn/no-deprecated-api, so the config sets those three back to errorsFlat config doesn't skip dot-folders the way eslintrc did, so
.claude/is ignored explicitly. Without that, a localnpm run lintalso walks the agent worktrees.npm audit, dev included: 0 vulnerabilitiesnpm run lint: 46 files, 0 errors, 0 warnings, and a file with deliberate violations still gets flaggednpm test: 222 pass, 2 skipped^22.13.0 || >=24. CI lints on 22.x, so that's fine, but it's higher than the>=22.0.0inengines(which is about running the app, not linting it)