Skip to content

Upgrading @eslint/js 8 to 9

Breaking8.57.1 → 9.39.5Breaking38Security3Platform1Deprecated7New118Changed30Fixed158Other789

BreakingUpgrade verdict

36 breaking changes and a platform requirement change and 3 security fixes.

  • Code that traversed the AST through other means must now use SourceCode for traversal.
  • The no-unused-vars rule now reports unused caught errors by default.
  • ESLint and RuleTester now refer to the flat config versions, and the Flat-prefixed names are swapped.
  • Rules now default to an empty schema, and rules written as functions are no longer supported.
Top 5 of 47 that need code or config changes

Node.js requirement changed in 9.0.0-alpha.0: ^12.22.0 || ^14.17.0 || >=16.0.0 → ^18.18.0 || ^20.9.0 || >=21.1.0.

Breaking36
Moves AST traversal into SourceCode.
SourceCode
Changes the no-unused-vars default for caughtErrors to 'all'.
no-unused-varscaughtErrors
Swaps FlatESLint-ESLint and FlatRuleTester-RuleTester in the API.
FlatESLintESLintFlatRuleTesterRuleTester
Sets default schema: [] and drops support for function-style rules.
schema
Switches Linter to flat config by default.
Linter
Updates shouldUseFlatConfig and CLI so flat config is the default.
shouldUseFlatConfig
Updates the eslint:recommended configuration.
eslint:recommended
Drops support for string configurations in flat config array.
Removes deprecated context methods.
Corrects the camelcase rule schema for the allow option.
camelcaseallow
Disallows multiple configuration comments for the same rule.
Rule Tester now checks for missing placeholder data in messages.
RuleTester
Changes the default for enforceForClassMembers in no-useless-computed-key.
no-useless-computed-keyenforceForClassMembers
Adds stricter rule test validations.
Allows multiple no-restricted-imports config entries for the same path.
no-restricted-imports
Detects duplicate test cases.
Changes no-inner-declaration default behaviour and adds an option.
no-inner-declaration
Upgrades eslint-scope to 8.0.0.
eslint-scope
Changes no-unused-vars varsIgnorePattern behavior with catch arguments.
no-unused-varsvarsIgnorePattern
Configuration comments with just severity retain options.
Removes CodePath#currentSegments.
CodePath#currentSegments
Removes no-inner-declarations from eslint:recommended.
no-inner-declarationseslint:recommended
Skips running warnings in --quiet mode.
--quiet
Adds two more cases to the no-implicit-coercion rule.
no-implicit-coercion
Removes the valid-jsdoc and require-jsdoc rules.
valid-jsdocrequire-jsdoc
Changes CLI behavior when no arguments are passed.
Checks for parsing errors in suggestion fixes.
Makes no-invalid-regexp allowConstructorFlags case-sensitive.
no-invalid-regexpallowConstructorFlags
Removes SourceCode#getComments().
SourceCode#getComments()
Removes formatters except html, json, json-with-metadata, and stylish.
htmljsonjson-with-metadatastylish
Drops support for jiti v1.21.
jiti
Handles --output-file for empty output when saving to disk.
--output-file
Parses the 'exported' comment using parseListConfig.
parseListConfig
Deprecates no-new-symbol and recommends no-new-native-nonconstructor.
no-new-symbolno-new-native-nonconstructor
Asserts suggestion messages are unique in rule testers.
RuleTester
Corrects the no-sequences rule schema.
no-sequences
Security3
Patches a minimatch security vulnerability for the v9.x line.
minimatch
Updates ajv to 6.14.0 to address security vulnerabilities.
ajv
Bumps @eslint/plugin-kit to 0.3.4 to resolve a vulnerability.
@eslint/plugin-kit
Platform1
Requires Node.js ^18.18.0 || ^20.9.0 || >=21.1.0.
Deprecated7
Marks deprecated rules as available until v11.0.0.
Marks deprecated formatting rules as available until v11.0.0.
Disallows use of the deprecated type property in core rule tests.
type
Removes the deprecated type property from core rule tests.
type
Documents deprecation of indent, quotes and semi rule types.
indentquotessemi
Marks LintMessage#nodeType as deprecated.
LintMessage#nodeType
Deprecates the multiline-comment-style and line-comment-position rules.
multiline-comment-styleline-comment-position