ESLint Blog

フィード

記事のアイキャッチ画像
ESLint v10.0.0-rc.2 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.Note that this prerelease version of ESLint has a separate documentation section.Notable bug fixesA regression in the core strict rule has been fixed.LegacyESLint and FlatESLint exports are now completely removed from the /use-at-your-own-risk entrypoint. In previous prerelease versions of ESLint v10, they were exported as null.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-dev1Copy code to clipboard You can also specify the version directly:npm i [email protected] --save-dev1Copy code to clipboard Migration GuideAs there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail al
3日前
記事のアイキャッチ画像
ESLint v10.0.0-rc.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 have any problems or feedback by creating issues on our GitHub repo.Note that this prerelease version of ESLint has a separate documentation section.Espree and ESLint Scope now include typesBeginning with Espree v11.1.0 and ESLint Scope v9.1.0, these packages now contain built-in type definitions.Previously, type definitions were provided by Definitely Typed packages @types/espree and @types/eslint-scope. There are several differences between the old and new type definitions, mostly bug fixes. If your code relies on types for the Espree and ESLint Scope packages, check if there are any updates needed.InstallingSince this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:npm i eslint@next --save-dev1Copy code to clipboard You can also specif
7日前
記事のアイキャッチ画像
ESLint's 2025 year in review
ESLint Blog
The plan for 2025 was to build upon the foundation of language plugins introduced in 2024 and to start the long-awaited core rewrite. We spent the year expanding our official language support to include CSS and HTML, introducing significant performance improvements through multithreaded linting, and preparing for the next major version, ESLint v10.0.0.Expanding language support: CSS and HTMLFollowing the release of JSON and Markdown support in 2024, we continued our mission to make ESLint a truly language-agnostic linter. In February, we released official CSS support via the @eslint/css plugin, allowing users to lint their stylesheets with the same familiar configuration system.In May, we were excited to announce that html-eslint had joined the ESLint ecosystem as a language plugin, bringing robust HTML linting to the project. These additions mean that ESLint can now officially be used to lint the “big three” of the web: JavaScript, CSS, and HTML.ESLint’s new CSS and HTML support were
14日前
記事のアイキャッチ画像
ESLint v10.0.0-rc.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.Note that this prerelease version of ESLint has a separate documentation section.Enhancements to RuleTesterSince its earliest days, ESLint has provided the RuleTester API to help plugin authors test their rules against custom test cases and configurations. This release introduces several enhancements to RuleTester to enforce more robust test definitions and improve debugging.requireData assertion optionA new assertion option, requireData, is now available. When set to true, RuleTester will require invalid test cases to include a data object whenever a messageId references a message with placeholders. This helps ensure that tests remain consistent with rule messages that rely on placeholder substitution.For example, consider a hypothetical ru
21日前
記事のアイキャッチ画像
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)
2ヶ月前
記事のアイキャッチ画像
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
2ヶ月前
記事のアイキャッチ画像
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
2ヶ月前
記事のアイキャッチ画像
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
3ヶ月前
記事のアイキャッチ画像
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
3ヶ月前
記事のアイキャッチ画像
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
3ヶ月前