npm / eslint
eslint
What changed in eslint 6 to 10, from its official release notes, upgrade guides and advisories. Also covers @types/eslint. Sources checked 2026-12-04.
178 breaking3 security6 deprecations37 new APIs and options1 performance49 behavior and defaults7 tooling141 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeslint 10185 changes
Breaking changes 52
Reports references inside immediately invoked function expressions.
Built-ins are exempted only when they reference the global.
The rule now reports unsafe labeled continue statements.
Reports max-nested-callbacks violations at the function head.
ESLint now searches upward from each linted file's directory for eslint.config.*, rather than using the previous cwd-based lookup by default.
context.getCwd() has been removed; use context.cwd instead.
context.getFilename() has been removed; use context.filename instead.
context.getPhysicalFilename() has been removed; use context.physicalFilename instead.
context.getSourceCode() has been removed; use context.sourceCode instead.
context.parserOptions has been removed; use context.languageOptions or context.languageOptions.parserOptions.
context.parserPath has been removed and has no replacement.
eslint-env comments are now reported as errors.
Remove v10_config_lookup_from_file from this environment variable; the flag has been removed.
The rules included in eslint:recommended have been updated.
Setting this variable to false no longer enables the old configuration format, which is no longer supported.
Legacy eslintrc configuration support has been removed.
The fake FlatESLint export has been removed.
The func-names rule schema has been tightened.
The rule schema now rejects extra items in its options array that were previously accepted and ignored.
Versions of jiti older than 2.2.0 are no longer supported.
Versions below 2.2.0 are no longer supported when using ESLint, including for TypeScript-authored config files.
JSX identifiers are now tracked as references to variables in scope, improving scope analysis and potentially changing rule reports.
The fake LegacyESLint export has been removed.
The configType option can no longer be set to eslintrc; remove the option to use the new configuration format.
The deprecated LintMessage#nodeType field has been removed.
The rule schema now requires unique items in its option array.
no-shadow-restricted-names reports globalThis by default.
This rule is now enabled in eslint:recommended, so existing code may produce new lint errors.
This rule is now enabled in eslint:recommended, so existing code may produce new lint errors.
Supported Node.js versions are now ^20.19.0, ^22.13.0, or >=24.
ParserOptions no longer includes ecmaVersion.
ParserOptions no longer includes sourceType.
This rule is now enabled in eslint:recommended, so existing code may produce new lint errors.
Program ranges now span the entire source text.
ResultsMeta now includes a color property.
Deprecated rule context methods have been removed.
All RuleFixer methods now assert that text is a string.
Valid test cases now use stricter assertions.
Valid test cases may no longer include an errors property; including it causes the test to fail.
Valid test cases may no longer include an output property; including it causes the test to fail.
Custom implementations must automatically resolve references to global variables declared in code, including var and function declarations.
Global variables are added through ScopeManager#addGlobals().
Deprecated SourceCode methods have been removed.
getJSDocComment() has been removed and has no replacement.
getTokenOrCommentAfter() has been removed; use getTokenAfter() with includeComments: true.
getTokenOrCommentBefore() has been removed; use getTokenBefore() with includeComments: true.
isSpaceBetweenTokens() has been removed; use isSpaceBetween().
The TDZ scope type has been removed.
The deprecated TestCaseError#type field has been removed.
Inactive unstable_* flags have been removed.
The v10_* flags have been removed.
The feature flag has been removed; attempting to use it now results in an error.
Security 1
The html formatter now escapes reserved characters in rule IDs, producing safer formatter output.
Deprecations 2
The always option of radix is deprecated.
The as-needed option of radix is deprecated.
New APIs and options 16
Accepts tokens and comments as inputs.
Adds d and v flags to no-unexpected-multiline.
Adds checkConditionalExpressions to inspect conditional expressions for unmodified loop conditions.
ConfigObject is now exported from eslint/config for use by developers consuming ESLint configuration APIs.
Added support for constructor callbacks in max-nested-callbacks.
Added the errorClassNames option to preserve-caught-error.
Adds checkRelationalComparisons to control checking of relational comparisons.
Adds includeIgnoreFile() to eslint/config for incorporating ignore files into configuration.
Rules can declare the languages they support through meta.languages.
Temporal is now included among the ES2026 globals.
API support for bulk suppressions was added.
Configuration objects can include a name.
max-params adds the countThis option.
no-implied-eval now supports self as an option.
RuleTester adds error assertion options.
RuleTester adds the requireData assertion option.
Performance 1
The rule no longer uses a quadratic-time regular expression, improving lint performance.
Behavior and default changes 27
The rule now recognizes string and computed keys in descriptors.
The rule now checks __proto__ and assignment targets.
The rule now handles TypeScript type assertions.
The rule now checks the importKind of individual specifiers.
Checks
globalThisfor invalid object calls.Checks
yield*expressions for unsafe optional chaining.The ignoreConstructors option now handles quoted properties.
Checks Object.prototype property names.
The radix rule now supports computed Number.parseInt member access.
The radix rule now reports invalid signed numeric radix values.
The rule now detects constant binary expressions involving Symbol() and BigInt().
Reports max-depth violations on keywords.
Reports max-lines-per-function violations at the function head.
Updates max-statements error locations to the function header.
The rule now checks sequence expressions in for-loop conditions.
The rule now provides suggestions for unused private class members.
The rule now recognizes Temporal objects when checking for disallowed object calls.
The no-var rule now applies fixes within TSModuleBlock nodes.
array-callback-return now handles Array.fromAsync callbacks.
The --color flag now takes precedence over environment variables when determining whether to use colorized output.
JSX references are tracked during linting.
The --no-color flag now takes precedence over environment variables when determining whether to use colorized output.
The stylish formatter now respects NO_COLOR when determining whether to disable colorized output.
The stylish formatter now respects NODE_DISABLE_COLORS when determining whether to disable colorized output.
Glob patterns now support POSIX character classes in bracket expressions for matching file names.
RuleTester outputs the failing test case index.
The built-in formatter now uses Node.js styleText instead of chalk, changing how environment variables and terminal capabilities determine color output.
Tooling 5
Added suggestions to no-compare-neg-zero.
Reports no-with violations at the with keyword.
A migration codemod upgrades ESLint projects from v9 to v10 and includes independently runnable codemods for config, custom rules, RuleTester, and Linter/ESLint API usage.
Failure locations are estimated for RuleTester assertions.
ESLint replaces chalk with styleText for terminal styling.
Fixes and other changes 81
The reported error location now points to the head.
The rule now skips its suggestion when the object is
super.The autofix now preserves necessary parentheses.
The autofix now preserves inline
typemodifiers.The autofix now preserves TypeScript type parameters.
Fixes property descriptor handling in the rule.
Handles LS, PS, and empty hashbang comments.
Prevents a crash on accessor fields without an initializer.
Fixes a crash when global objects are used as property values.
Avoids invalid autofixes for super methods.
Prevents invalid autofixes at the start of a statement.
Prevents combined fixes from creating a redeclared
let.Fixes handling of astral letters.
Adds the missing space after else in autofixes.
Supports TSFunctionType nodes.
Corrects messages for long private names.
Skips lines containing multiple comments.
Handles astral letters when enforcing capitalization conventions.
Avoids a false positive for 0.e5.
Avoids a false positive in conditional tests.
Corrects autofixing for async function bases.
The rule no longer reports __proto__ properties.
The rule now ignores __proto__ properties.
TimePass.parse is now optional in the types.
Adds support for __proto__ in exported comments.
Fixes a false positive for UTC calls when properties is false.
Fixes false negatives involving class fields and static blocks.
Ignores static imports when reporting unreachable code.
Prevents the autofix from breaking when Object is shadowed.
Fixes a false positive for numeric literals with a trailing decimal point.
The rule now handles numeric underflow cases.
Prevents unsafe autofixes when functions are hoisted.
Prevents autofixes when a var is shadowed by a catch parameter.
Prevents invalid autofixes that create a tagged template call.
False positives are corrected for the accessor-pairs rule.
False positives are corrected for the getter-return rule.
Meta-property names are now ignored when checking identifiers against the denylist.
Meta-property names are now ignored when checking identifiers against the configured pattern.
The autofix now prevents an ASI hazard when removing unused labels.
The removeVar suggestion now handles ASI hazards safely.
Ignore configurations are now applied to computed methods.
The rule no longer crashes when all loop types are ignored.
The rule now adds a semicolon when inserting parentheses.
The rule now handles NewExpression nodes with a parenthesized callee.
Fixed handling of static template literals.
The null option no longer reports non-equality operators.
ignoreClassesWithImplements now applies to class expressions.
Avoided false positives for shadowed RegExp.
Sequence expression operands are now parenthesized correctly.
Avoided false positives for shadowed RegExp.
Avoided false positives for shadowed globals.
Cause insertion now occurs outside wrapping parentheses.
Avoided false positives for spread arguments.
Avoided false positives on shadowed NaN and Number.
Restores the rule's report range for files containing too many classes.
Fixes callback detection for IIFEs and avoids reporting inner non-callbacks.
The rule now correctly accounts for a shadowed Boolean identifier.
Suppresses an invalid class suggestion produced by the rule.
The rule no longer reports shadowed undefined identifiers.
Fixes an invalid autofix when the rule reports an expression at the start of a statement.
The rule no longer reports shadowed undefined identifiers or shadowed Promise references.
The rule no longer reports shadowed undefined identifiers.
Corrects max-depth handling for else-if chains.
Corrected stack tracking for max-nested-callbacks violations.
Adds missing CodePath and CodePathSegment types for consumers of ESLint's type definitions.
Failures from delegated commands are now propagated so command-line failures are reported correctly.
Corrects an invalid autofix when a newline appears after async.
Prevents a false positive for a reference in a finally block.
Deprecated rule replacements that are not arrays are now handled correctly.
ESLint now handles an unavailable require cache, preventing failures when the cache cannot be accessed.
Rule suggestions no longer cause unintended continuation in a class body.
Generator yield resumption paths are modeled correctly in code path analysis.
Language and processor validation errors are clarified, helping diagnose invalid configuration.
The rule no longer reports false positives when Promise is shadowed.
The no-var rule no longer autofixes when a variable is used before its declaration.
Messages now include the variable name, making reported useless assignments easier to identify.
The error message for unused suppressions was updated.
The name property has been restored to the ESLint core configs exported from this package.
FORCE_COLOR remains supported to force-enable colors in formatter output.
no-restricted-import messages have been corrected.
verifyAndFix now receives filename as its third argument.
eslint 9127 changes
Breaking changes 85
The rule's allow option now only accepts an array of strings.
The no-unused-vars rule now checks whether caught errors are used by default.
The checkstyle formatter was removed from core; install eslint-formatter-checkstyle to use it.
The deprecated CodePath.currentSegments property has been removed.
The compact formatter was removed from core; install eslint-formatter-compact to use it.
Multiple configuration comments for the same rule are disallowed.
Deprecated context methods were removed.
Removed from context; use sourceCode.getAllComments() instead.
Removed from context; use sourceCode.getAncestors(node) instead.
Removed from context; replace it with the appropriate sourceCode comment methods.
Removed from context; use sourceCode.getCommentsAfter() instead.
Removed from context; use sourceCode.getCommentsBefore() instead.
Removed from context; use sourceCode.getCommentsInside() instead.
Removed from context; use sourceCode.getDeclaredVariables() instead.
Removed from context; use sourceCode.getFirstToken() instead.
Removed from context; use sourceCode.getFirstTokens() instead.
Removed from context; use sourceCode.getJSDocComment() instead.
Removed from context; use sourceCode.getLastToken() instead.
Removed from context; use sourceCode.getLastTokens() instead.
Removed from context; use sourceCode.getNodeByRangeIndex() instead.
Removed from context; use sourceCode.getScope(node) instead.
Removed from context; use sourceCode.getText() instead.
Removed from context; use sourceCode.getLines() instead.
Removed from context; use sourceCode.getTokenAfter() instead.
Removed from context; use sourceCode.getTokenBefore() instead.
Removed from context; use sourceCode.getTokenByRangeStart() instead.
Removed from context; use sourceCode.getTokens() instead.
Removed from context; use sourceCode.getTokensAfter() instead.
Removed from context; use sourceCode.getTokensBefore() instead.
Removed from context; use sourceCode.getTokensBetween() instead.
Removed from context; use sourceCode.markVariableAsUsed(name, node) instead.
Removed from context; use sourceCode.parserServices instead.
The no-useless-computed-key rule now flags unnecessary computed member names in classes by default.
A configuration comment specifying only severity now retains options for that rule from the config file and overrides only its severity.
The string preset is no longer accepted in a flat config array; use @eslint/js presets instead.
The preset now enables no-constant-binary-expression, no-empty-static-block, no-new-native-nonconstructor, and no-unused-private-class-members, and removes four previously enabled rules.
The string preset is no longer accepted in a flat config array; use @eslint/js presets instead.
The FlatRuleTester export has been removed from this entry point.
eslint.config.js is the default configuration format; eslintrc is deprecated and is no longer searched for automatically.
Multiple configuration comments for the same rule are disallowed: the first applies and subsequent comments are reported as lint errors.
FlatESLint is renamed to ESLint, while the v8 ESLint class is renamed to LegacyESLint.
Variable names followed by a colon and value are ignored as invalid; directives should use comma-separated variable names.
String configurations are no longer supported in flat config arrays.
All formatters except html, json, json-with-metadata, and stylish were removed.
Rules exported as functions are no longer supported; rules must use an object with a create() method.
The jslint-xml formatter was removed from core; install eslint-formatter-jslint-xml to use it.
The junit formatter was removed from core; install eslint-formatter-junit to use it.
Set configType to eslintrc in the constructor to retain v8.x Linter functionality.
This Linter method is no longer available; configure parsers through flat config languageOptions instead.
This Linter method is no longer available; define rules in flat config plugins instead.
This Linter method is no longer available; define rules in flat config plugins instead.
This Linter method is no longer available.
The config argument must use flat config format.
Rules that receive options must specify meta.schema or ESLint throws an error.
This rule is now enabled in eslint:recommended.
The rule's schema is stricter and it does not accept any options.
This rule is now enabled in eslint:recommended.
The rule now reports -(-foo) and foo - 0 by default; set allow to ["-", "- -"] to retain its previous behavior.
The rule has new default behavior and an option; it is also no longer included in eslint:recommended.
The allowConstructorFlags option now matches flags case-sensitively.
This rule is now enabled in eslint:recommended.
With flat config, omitting patterns lints the current directory; with eslintrc, omitting patterns produces an error.
The rule's schema is stricter and accepts one option: an object with an allowInParentheses boolean property.
This rule is now enabled in eslint:recommended.
varsIgnorePattern no longer applies to catch-clause arguments; use caughtErrorsIgnorePattern to specify ignore patterns for catch variables.
ESLint v9 no longer supports Node.js versions below v18.18 or v19; supported versions are v18.18.0 and above, v20.9.0 and above, and v21 and above.
Use this flag to preserve the v8 behavior where running ESLint without patterns exits with code 0.
The flag now prevents rules set to warn from executing, except when --max-warnings is used; in that case, those rules execute but their output is suppressed.
The require-jsdoc rule was removed; use equivalent replacement rules in eslint-plugin-jsdoc.
RuleTester checks that messages do not contain unsubstituted placeholders.
Suggestion test objects must specify desc or messageId, but not both, and suggestion messages for one problem must be unique.
Suggestion test objects must specify output, and that output must change the code and parse as valid syntax.
Identical test cases are automatically detected, and filename and only properties are type-checked.
Test error objects must specify message or messageId.
A test case's output must differ from code; omit output or set it to null when no autofix is expected.
Tests must specify suggestions when the actual error provides them; omitting the property asserts there are none.
FlatRuleTester is renamed to RuleTester, the v8 RuleTester is removed, and the flat-config RuleTester defaults to ecmaVersion latest and sourceType module.
FlatRuleTester is now named RuleTester; the API names were also swapped.
Removed; replace it with getCommentsBefore(), getCommentsAfter(), or getCommentsInside().
AST traversal moved into SourceCode, changing where custom rules access traversal functionality.
Parsing errors are now checked in suggestion fixes.
The tap formatter was removed from core; install eslint-formatter-tap to use it.
The unix formatter was removed from core; install eslint-formatter-unix to use it.
The valid-jsdoc rule was removed; use equivalent replacement rules in eslint-plugin-jsdoc.
The visualstudio formatter was removed from core; install eslint-formatter-visualstudio to use it.
Security 2
ajv was updated to address security vulnerabilities.
A security vulnerability patch was applied for ESLint 9.x.
Deprecations 2
ESLint now emits a warning when it detects an .eslintignore file.
no-new-symbol is deprecated; no-new-native-nonconstructor is recommended instead.
New APIs and options 11
The no-inner-declarations option defaults to allowing block-level functions in strict mode when ecmaVersion is 2015 or above.
Enabled eslint.config.cjs as a flat config file name.
Enabled eslint.config.mjs as a flat config file name.
Added a CLI flag to inspect configuration.
Added loadESLint() to provide an API for loading ESLint in v9.
Added an option to report unused fallthrough comments.
Added allowImportNames to permit specified import names.
Added an option to ignore classes with a static initialization block.
Added reportUsedIgnorePattern to report variables that match an ignore pattern but are used.
Added the no-useless-assignment rule.
Added rule performance statistics for flat ESLint.
Behavior and default changes 13
The rule highlights only the static block header.
Error locations now point to the duplicate key.
The rule now highlights only the function header, changing where complexity warnings appear.
Code path information is precalculated before rule traversal, so it is complete wherever accessed inside a rule.
Unused disable directives now produce warnings by default.
ESLint now maintains the latest ECMAScript version.
Set ESLINT_USE_FLAT_CONFIG to false to continue using the deprecated eslintrc configuration format.
This rule is no longer enabled in eslint:recommended.
This rule is no longer enabled in eslint:recommended.
This rule is no longer enabled in eslint:recommended.
This rule is no longer enabled in eslint:recommended.
Multiple paths entries with the same name now all apply, allowing different restrictions and messages for imported names.
The flag now writes a file to disk even when the output is empty.
Fixes and other changes 14
Restored TypeScript 4.0 compatibility in ESLint types.
ESLint now warns when eslint-env configuration comments are found.
Only the node is passed to JS language visitor methods, correcting the visitor method arguments.
Error locations are updated.
The rule now allows JSDoc comments.
Program nodes now use the AST.Program type.
Rule typings are corrected for more accurate TypeScript usage.
Scope typings are corrected for more accurate TypeScript usage.
Forward traversal now passes step arguments to visitors.
The error message is improved when a suggestion lacks a fix function.
Timing reporting is unified for concurrent linting.
The rule no longer incorrectly reports some numeric literals written with e notation.
Type support for isolated dependencies in pnpm was improved.
The SourceCode type definitions were corrected for developers using the API.
eslint 837 changes
Breaking changes 15
Upgraded Espree and added support for new class features.
Removed the codeframe formatter.
Changed the rule schema.
Disable directives are now fixable.
Reserved words are disallowed in ES3.
Added rules to eslint:recommended.
Fixable rules are now required to provide meta.
Removed meta.docs.category from core rules.
Rules with suggestions are now required to provide meta.hasSuggestions.
The rule now checks class fields.
The rule now catches the eval case of MemberExpression.
Dropped support for Node.js 10, 13, and 15.
Package exports are now strict, which may affect package entry points consumers use.
RuleTester no longer allows SourceCode#getComments().
Removed the table formatter.
New APIs and options 2
Added enforceForClassFields to apply the rule to class fields.
Added the ignoreExpressions option.
Behavior and default changes 5
Code path analysis now supports class fields.
The rule now supports class fields.
Error logs now include the ruleId.
The rule now supports class fields.
Added support for the regular expression d flag.
Tooling 1
Flat config now suggests missing rules.
Fixes and other changes 14
ignoreGlobals no longer applies to undefined variables.
Formatting is preserved when rules are removed from disable directives.
Fixed a false positive with private identifiers.
The rule reports a location for the never option.
Fixed compatibility with private names.
Fixed semicolon-less style handling.
The rule no longer applies to class fields.
Fixed rule logic for class fields.
Fixed a false negative involving the comma operator.
Fixed edge cases involving class fields.
Fixed handling of computed class fields.
Fixed a PrivateIdentifier false positive.
Corrected the message for property assignments.
The rule ignores switch cases after colons.
eslint 767 changes
Breaking changes 25
The classes option now defaults to true.
The rule now checks flatMap and Array.forEach callbacks.
The rule now checks Array.forEach callbacks.
The classes option now defaults to true.
Relative paths in configuration files specified with --config now resolve differently.
The default ignore pattern changed.
Directive comments now support descriptions.
A new ESLint API was added.
New rules were added to eslint:recommended.
ESLint upgraded to Espree 7.0.0, a breaking parser change.
The CLI no longer includes .js as a default extension for --ext.
The rule now checks unnamed default exports and handles AssignmentPattern in as-needed mode.
The rule now checks identifiers in array patterns.
The rule now checks some computed keys.
The rule now checks assignment targets.
The rule uses a stricter array index check.
The rule now reports constructor calls.
The rule now checks template literals.
ESLint no longer supports Node.js 8.
Files matched by overrides are now linted.
Plugin resolution behavior changed.
The rule was made stricter.
Tests with an unknown error property now fail.
enforceForSwitchCase now defaults to true.
The rule now checks template literals.
Deprecations 2
Using ~/.eslintrc is now deprecated at runtime.
The Node.js and CommonJS categories of rules were deprecated.
New APIs and options 8
The rule now has separate pattern and expression options.
The rule now handles nested arrays.
Added a rule requiring default clauses to be last in switch statements.
Adds the offsetTernaryExpressions option to the indent rule.
Adds the outerIIFEBody option value off to the indent rule.
Adds a rule for restricting exports.
Adds a rule for detecting useless regular-expression backreferences.
Adds an option to allow void as a statement.
Behavior and default changes 4
Rules now support globalThis.
The rule now checks template literals and introspects arrays.
The rule now considers configured environments and supports globalThis.
The rule now reports the operator location.
Tooling 1
RuleTester now supports testing suggestions with data.
Fixes and other changes 27
The rule's reported location was improved.
The rule now checks assignment property targets and avoids false positives with computed properties.
The rule's reported location was improved.
Handles locally unsupported regular expressions in computed property keys.
Improves the reported location for computed-property-spacing violations.
The never option now reports the correct message.
The rule's reported location was improved.
The rule now ignores ObjectPatterns.
Fixes Windows path parsing in JUnit output.
Corrects how the rule counts the length of JSX comments.
The rule's reported location was improved.
newBasePath must be an absolute path.
The rule's reported location was improved.
The rule's reported location was improved.
Async methods are now supported by the allow option.
The rule's reports now include an end location.
The rule's reports now include an end location.
The inconsistently works option behavior was fixed.
Reports double extra parentheses and fixes CallExpression callee false negatives.
Stops reporting multiline strings as violations.
Comma operands in a for-loop afterthought are now allowed.
The rule's reports now include an end location.
Fixes false negatives for export * and improves reporting for importNames restrictions.
The rule now handles TemplateLiteral module names.
The rule's reports now include an end location.
Async generators are now ignored by the rule.
The rule's reported location was improved.
eslint 66 changes
Breaking changes 1
The unusable profile command was removed.
Fixes and other changes 5
Trailing comments are now properly ignored.
Corrected an incorrect message.
The autofix no longer produces name collisions.
The rule no longer fixes variables named 'let'.
The rule now reports parameters.