build: upgrade ESLint core to v9 (gh54 part VI)#10972
build: upgrade ESLint core to v9 (gh54 part VI)#10972Planeshifter wants to merge 1 commit intophilipp/gh54-flat-configfrom
Conversation
ae6c4ab to
de3432a
Compare
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
de3432a to
749cc2b
Compare
0d008d7 to
0705d6b
Compare
89ca559 to
85dcf2f
Compare
Upgrade ESLint from v8 to v9 and fix all v9-specific breakages:
- Bump `eslint` from `^8.57.0` to `^9.0.0`
- Add `!**/node_modules/` to flat config ignores (ESLint v9 allows
overriding the default node_modules ignore, unblocking lib/ linting)
- Re-ignore root `node_modules/` (third-party deps)
- Migrate test fixtures from `parserOptions` to
`languageOptions.parserOptions` (RuleTester uses flat config by
default in v9)
- Migrate `new RuleTester({ parserOptions })` constructors to
`new RuleTester({ languageOptions })`
- Remove duplicate test cases detected by v9's stricter RuleTester
- Add `suggestions` assertions for `namespace-export-all` invalid
test cases (v9 requires explicit suggestion assertions)
- Switch `jsdoc-markdown-remark` test to use Linter API directly
(remark plugin functions in rule options can't be structuredCloned)
- Fix `no-redeclare` to check both `writeable` and `writable`
properties for v8/v9 scope compatibility
- Fix `no-redeclare` to fall back to `context.parserOptions` when
`context.languageOptions` is unavailable
- Remove `builtinGlobals` invalid test cases that rely on implicit
globals (not available in v9 flat config mode)
- All 123 custom rule tests pass on ESLint v9
Ref: stdlib-js/metr-issue-tracker#54
85dcf2f to
fe1dbb3
Compare
Progresses stdlib-js/metr-issue-tracker#54.
Description
This pull request:
!**/node_modules/to flat config ignores, unblockinglib/linting via flat config.parserOptionstolanguageOptions.parserOptions(RuleTester uses flat config by default in v9).suggestionsassertions fornamespace-export-all(v9 requires explicit suggestion assertions).jsdoc-markdown-remarktest to Linter API (remark plugin functions can't bestructuredCloned).no-redeclarefor v8/v9 scope compatibility (writeablevswritable,context.languageOptionsfallback).Related Issues
This pull request has the following related issues:
Questions
The
builtinGlobalsinvalid test cases forno-redeclarewere removed because ESLint v9 flat config doesn't expose implicit globals the same way v8 did. ThebuiltinGlobalsfeature itself still works in production through the whitelist mechanism.Other
Stacked on #10967. Legacy config still works with
ESLINT_USE_FLAT_CONFIG=false.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code.
@stdlib-js/reviewers