ESLint Blog
フィード

ESLint v9.39.2 released
ESLint Blog
HighlightsThis release prints a warning message when an /* eslint-env */ configuration comment is found in the code being linted. The warning includes the filename and line number of the comment, along with instructions on how to replace it. The purpose of this warning is to allow for a smoother migration, since starting with ESLint v10.0.0, /* eslint-env */ comments are reported as errors by the linter, as explained in the migration guide.Bug Fixes5705833 fix: warn when eslint-env configuration comments are found (#20381) (sethamus)Build Related506f154 build: add .scss files entry to knip (#20391) (Milos Djermanovic)Chores7ca0af7 chore: upgrade to @eslint/[email protected] (#20394) (Francesco Trotta)c43ce24 chore: package.json update for @eslint/js release (Jenkins)4c9858e ci: add v9.x-dev branch (#20382) (Milos Djermanovic)
5日前

ESLint v10.0.0-beta.0 released
ESLint Blog
HighlightsThis version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you have any problems or feedback by creating issues on our GitHub repo.Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. There are summaries of the significant changes below. (Less significant changes are included in the migration guide.)This prerelease version of ESLint has a separate documentation section.RuleTester assertion optionsThe RuleTester#run() method now supports assertion options, specifically requireMessage and requireLocation, to let developers enforce stricter requirements in rule tests. These options enforce that every invalid test case explicitly checks violation messages and/or locations, ensuring that a test fails if it doesn’t meet the requirements.requireMessageEnsures every test case includes a message check.Accepts:true: Must u
5日前

ESLint v10.0.0-alpha.1 released
ESLint Blog
HighlightsThis version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo.Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. There are summaries of the significant changes below. (Less significant changes are included in the migration guide.)This prerelease version of ESLint has a separate documentation section.Removed deprecated SourceCode methodsThe following SourceCode methods are no longer available:getTokenOrCommentBefore() - Use getTokenBefore() with the { includeComments: true } option insteadgetTokenOrCommentAfter() - Use getTokenAfter() With the { includeComments: true } option insteadisSpaceBetweenTokens() - Use isSpaceBetween() insteadgetJSDocComment() - No replacementUsers of plugins that haven’t updated their code yet can use the @eslint/co
19日前

ESLint v10.0.0-alpha.0 released
ESLint Blog
HighlightsThis version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo.Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. There are summaries of the significant changes below. (Less significant changes are included in the migration guide.)This prerelease version of ESLint has a separate documentation section.Node.js < v20.19.0, v21, v23 no longer supportedAs of this post, Node.js v22.x is the LTS release, and as such we are dropping support for all versions of Node.js prior to v20.19.0 as well as v21.x and v23.x.ESLint v10.0.0 supports the following versions of Node.js:Node.js v20.19.0 and aboveNode.js v22.13.0 and aboveNode.js v24 and aboveNew configuration file lookup algorithmESLint v10.0.0 locates eslint.config.* by starting from the directory of
1ヶ月前

ESLint v9.39.1 released
ESLint Blog
HighlightsThis patch release fixes an issue introduced in ESLint v9.39.0 where visitors of all rules are invoked with a second argument. This change broke third-party rules that expect visitor functions to receive only a single argument, notably @typescript-eslint/unified-signatures. To ensure compatibility, ESLint v9.39.1 restores the previous behavior of invoking visitors for JavaScript/TypeScript with only the target node as the argument.Bug Fixes650753e fix: Only pass node to JS lang visitor methods (#20283) (Nicholas C. Zakas)Documentation51b51f4 docs: add a section on when to use extends vs cascading (#20268) (Tanuj Kanti)b44d426 docs: Update README (GitHub Actions Bot)Chores92db329 chore: update @eslint/js version to 9.39.1 (#20284) (Francesco Trotta)c7ebefc chore: package.json update for @eslint/js release (Jenkins)61778f6 chore: update eslint-config-eslint dependency @eslint/js to ^9.39.0 (#20275) (renovate[bot])d9ca2fc ci: Add rangeStrategy to eslint group in renovate config
1ヶ月前

ESLint v9.39.0 released
ESLint Blog
HighlightsMore precise problem locationsESLint v9.39.0 introduces improvements that narrow the highlighted locations for certain rule violations. By reducing unnecessary highlighting, these changes cut down on visual noise and make issues in code easier to spot and fix.Here’s what’s new:complexity: In v9.38.0, this rule was updated to highlight only a function’s header instead of the entire function. With v9.39.0, the same refinement now applies to class static blocks: only the header is highlighted, not the whole block.for-direction: Now highlights only the header portion of a for loop, instead of the full statement.no-dupe-args: Now highlights just the argument list in a function definition, not the whole function.no-dupe-class-members: Now highlights only the identifiers of duplicated members, rather than their full definitions.Unified rule performance reportWhen the TIMING environment variable is set and ESLint runs in multithread mode with the --concurrency option, the output now
2ヶ月前

ESLint v9.38.0 released
ESLint Blog
HighlightsPlugin config resolution improvementsThis release introduces improvements in determining which configuration to use from plugins that support both old (eslintrc) and new configuration formats. When extending a plugin configuration, for example extends: ["my-plugin/recommended"], the defineConfig() config helper was already looking for configs["flat/recommended"] configuration if configs["recommended"] configuration exists in the plugin but is detected as the eslintrc configuration format.As of this release:The defineConfig() config helper will look for configs["flat/recommended"] configuration even if configs["recommended"] configuration does not exist in the plugin.Configurations that have array values as the plugins property will be detected as the eslintrc configuration format.Other notable changesThe complexity rule now highlights only the function header instead of the entire function.Featuresce40f74 feat: update complexity rule to only highlight function header (#20048)
2ヶ月前

What's coming in ESLint v10.0.0
ESLint Blog
The Technical Steering Committee (TSC) has finalized the features for ESLint v10.0.0. This post outlines our high-level plans for v10.0.0. For more details, and to keep up to date with everything that is planned for v10.0.0, visit our project board.Development planSimilar to v9.0.0, we will develop v10.0.0 in phases to ensure stability and gather community feedback:Alpha. The alpha release will include the most significant breaking changes that we expect will cause the most disruption for existing users. This early release will help us gather feedback and validate our approach.Beta. The beta release will include the remaining features and smaller breaking changes that will impact fewer users.After the beta has been validated through community testing, we will publish one or more release candidates as we continue to fix bugs and address compatibility issues.Significant changes in v10.0.0-alphaThe following changes are planned for the alpha release and represent significant breaking chan
2ヶ月前

ESLint v9.37.0 released
ESLint Blog
HighlightsallowTypeImports option in no-restricted-importsThe no-restricted-imports rule now supports the allowTypeImports option.When set to true, this will allow type-only imports in TypeScript files while still disallowing regular imports.For example, the following rule setting permits only type-only imports from the node:assert module:/* eslint no-restricted-imports: ["error", { name: "node:assert", allowTypeImports: true, }]*/import assert from "node:assert"; // ❌ Incorrectimport type { AssertionError } from "node:assert"; // ✅ Correct12345678910Copy code to clipboard This aligns the no-restricted-imports rule with the corresponding typescript-eslint rule, and continues ESLint’s ongoing efforts to extend TypeScript Syntax support in core rules.Improved heuristic for --concurrency=autoAfter the introduction of multithreaded linting in ESLint v9.34.0, some users running ESLint with the --cache flag reported slower performance when using --concurrency=auto compared to leaving the --c
2ヶ月前

ESLint v9.36.0 released
ESLint Blog
HighlightsThis release fixes several edge cases in the recently added preserve-caught-error rule. In some cases, this can result in reporting more linting errors.All config objects exported from the @eslint/js package are now deeply frozen.Features47afcf6 feat: correct preserve-caught-error edge cases (#20109) (Francesco Trotta)Bug Fixes75b74d8 fix: add missing rule option types (#20127) (ntnyq)1c0d850 fix: update eslint-all.js to use Object.freeze for rules object (#20116) (루밀LuMir)7d61b7f fix: add missing scope types to Scope.type (#20110) (Pixel998)7a670c3 fix: correct rule option typings in rules.d.ts (#20084) (Pixel998)Documentationb73ab12 docs: update examples to use defineConfig (#20131) (sethamus)31d9392 docs: fix typos (#20118) (Pixel998)c7f861b docs: Update README (GitHub Actions Bot)6b0c08b docs: Update README (GitHub Actions Bot)91f97c5 docs: Update README (GitHub Actions Bot)Chores12411e8 chore: upgrade @eslint/[email protected] (#20139) (Milos Djermanovic)488cba6 chore: package.j
3ヶ月前