
Published under: Announcements 4 min read
Automating ESLint migrations with Codemod
ESLint and Codemod are partnering to deliver official codemods for ESLint migrations.








Published under Release Notes
We just pushed ESLint v10.7.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.
checkConstructorCallCallbacks in max-nested-callbacksThe max-nested-callbacks rule now supports a checkConstructorCallCallbacks option.
When enabled, the rule also counts callback functions passed to constructor calls with new, such as new Promise((resolve) => {}), when calculating nesting depth.
For example, with { "max": 1, "checkConstructorCallCallbacks": true }, the rule reports the following code as exceeding the allowed callback nesting depth:
run(() => {
new Promise(resolve => resolve());
});
errorClassNames in preserve-caught-errorThe preserve-caught-error rule now supports an errorClassNames option.
This option lets you specify additional custom error class names that must preserve the original caught error by passing it as a cause.
For example, with { "errorClassNames": ["MyError"] }, the following code is reported because the thrown MyError does not include the original error as a cause, just like built-in error types must:
try {
doSomething();
} catch (error) {
throw new MyError("something went wrong");
}
no-compare-neg-zeroThe no-compare-neg-zero rule now supports suggestions. Where appropriate, it suggests replacing -0 with 0 or using Object.is() instead of operators such as === or !==.
For example, for an expression such as x === -0, the rule suggests x === 0 to preserve the existing comparison behavior, and Object.is(x, -0) to distinguish -0 from +0.
cf2a9bf feat: add errorClassNames option to preserve-caught-error rule (#21032) (sethamus)f8b873a feat: max-nested-callbacks option for constructor callbacks (#21063) (fnx)557fde8 feat: support computed Number.parseInt member access in radix rule (#21041) (Pixel)0b4a73b feat: add suggestions to no-compare-neg-zero (#21034) (den$)96cdd42 feat: report invalid signed numeric radix values in radix rule (#21030) (Pixel)3e7bf15 fix: apply ignoreClassesWithImplements to class expressions (#21069) (Pixel)0d7d70c fix: insert cause outside wrapping parens in preserve-caught-error (#21062) (Mahin Anowar)75ec753 fix: handle static template literals in eqeqeq rule (#21058) (Pixel)b717a22 fix: prevent eqeqeq null option from reporting non-equality operators (#21057) (Pixel)e35b05f fix: avoid no-invalid-regexp false positive for shadowed RegExp (#21051) (Pixel)a3172b6 fix: avoid no-control-regex false positive for shadowed RegExp (#21050) (Pixel)d1f637e fix: parenthesize sequence expression operands in no-implicit-coercion (#21045) (spokodev)8859baf fix: avoid prefer-numeric-literals false positive for shadowed globals (#21047) (한국)a9e5961 fix: use-isnan false positive on shadowed NaN/Number (#20958) (sethamus)8a240a7 fix: avoid false positives in radix rule for spread arguments (#21044) (Pixel)c30d808 docs: Update README (GitHub Actions Bot)5139800 docs: document ESLint migration codemods in v9 and v10 guides (#20980) (Alex Bit)04174cb docs: Update README (GitHub Actions Bot)026e130 docs: update semver policy for bug fixes (#21048) (Milos Djermanovic)9d42fef docs: Update README (GitHub Actions Bot)b230159 docs: Update README (GitHub Actions Bot)0129972 docs: correct **/.js glob to **/*.js in config files guide (#21036) (EduardF1)9489379 chore: update dependency @eslint/eslintrc to ^3.3.6 (#21076) (renovate[bot])81a4774 chore: updates for v9.39.5 release (Jenkins)9835414 chore: enable $ExpectType annotations in all TypeScript files (#21071) (Francesco Trotta)72adf6b chore: restrict markdownlint-cli2 updates in renovate (#21067) (lumir)833ec10 chore: update dependency prettier to v3.9.4 (#21061) (renovate[bot])7ea106d chore: update ecosystem plugins (#21059) (ESLint Bot)8fb550e chore: add prettier update commit to .git-blame-ignore-revs (#21056) (lumir)e4e1166 chore: update dependency prettier to v3.9.1 (#21055) (renovate[bot])0493f53 chore: update prettier to v3.9.0 (#21054) (Pixel)1056a99 chore: update dependency prettier to v3.8.5 (#21049) (renovate[bot])4d4155d ci: run ecosystem tests on pull requests (#21027) (sethamus)993539f chore: update dependency @eslint/json to ^2.0.1 (#21042) (renovate[bot])53f8b69 test: add error locations to no-constant-binary-expression (#21039) (lumir)5ab71d5 refactor: clean up radix rule internals (#21015) (Pixel)a80a9a4 chore: update ecosystem plugins (#21035) (ESLint Bot)7c9a029 ci: add Node.js 26 to CI (#20847) (lumir)The latest ESLint news, case studies, tutorials, and resources.

Published under: Announcements 4 min read
ESLint and Codemod are partnering to deliver official codemods for ESLint migrations.

Published under: Release Notes 1 min read
We just pushed ESLint v9.39.5, which is a patch release upgrade of ESLint. This release fixes several bugs found in the previous release.

Published under: Sponsorships 1 min read
We are happy to announce that CodeRabbit is a gold sponsor of ESLint. We are grateful to Santosh Yadav, Principal Developer Advocate, and the whole CodeRabbit team.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。