ESLint Blog
フィード

ESLint v10.5.0 released
ESLint Blog
HighlightsFive core rules now highlight smaller ranges of code to avoid shadowing other problems in editors.Rules max-lines-per-function, max-nested-callbacks, and max-statements now highlight only the function header instead of the entire function.Rules max-depth and no-with now highlight only the first keyword.Several errors in the calculations have been corrected in the max-depth and max-nested-callbacks rules. These bug fixes can result in reporting more linting errors in existing code.Features5ca8c52 feat: correct stack tracking in max-nested-callbacks (#20973) (Pixel998)b565783 feat: report no-with violations at the with keyword (#20971) (Pixel998)2ce032f feat: report max-lines-per-function violations at function head (#20966) (Pixel998)732cb3e feat: report max-nested-callbacks violations at function head (#20967) (Pixel998)f9c138a feat: report max-depth violations on keywords (#20943) (Pixel998)bdb496c feat: correct max-depth handling for else-if chains (#20944) (Pixel998)c29687
8日前

ESLint v10.4.1 released
ESLint Blog
Bug Fixese557467 fix: update @eslint/plugin-kit version to 0.7.2 (#20930) (Francesco Trotta)d4ce898 fix: propagate failures from delegated commands (#20917) (Minh Vu)f4f3507 fix: prefer-arrow-callback invalid autofix with newline after async (#20916) (kuldeep kumar)c5bc78b fix: false positive for reference in finally block (#20655) (Tanuj Kanti)27538c0 fix: add missing CodePath and CodePathSegment types (#20853) (Pixel998)Documentation61b0add docs: remove deprecated rule from related rules of max-params (#20921) (Tanuj Kanti)305d5b9 docs: remove deprecated rules from related rules section (#20911) (Tanuj Kanti)49b0202 docs: fix display: none of ad (#20901) (Tanuj Kanti)9067f94 docs: switch build to Node.js 24 (#20893) (Milos Djermanovic)c91b041 docs: Update README (GitHub Actions Bot)e349265 docs: clarify semver strings in rule deprecation objects (#20885) (Milos Djermanovic)Choresb0e466b test: add data property to invalid tests cases for rules (#20924) (Tanuj Kanti)f78838b test: add C
22日前

ESLint v10.4.0 released
ESLint Blog
HighlightsNew includeIgnoreFile() helperThis release introduces the includeIgnoreFile() helper for configuration files that allows for including patterns from .gitignore files or any other files with gitignore-style patterns.Previously available in the external package @eslint/compat, the new includeIgnoreFile helper function is exported from the eslint/config entrypoint and provides an extended API that allows multiple files to be included and patterns to be interpreted relative to the location of those files, which is a common use case for nested .gitignore files.// eslint.config.jsimport { defineConfig, includeIgnoreFile } from "eslint/config";import { fileURLToPath } from "node:url";const rootGitignorePath = fileURLToPath( new URL(".gitignore", import.meta.url));const nestedGitignorePath = fileURLToPath( new URL("some/other/folder/.gitignore", import.meta.url),);export default defineConfig([ includeIgnoreFile([rootGitignorePath, nestedGitignorePath], { // option to interpret patter
1ヶ月前

ESLint v10.3.0 released
ESLint Blog
Highlightsno-unused-private-class-members SuggestionsThe no-unused-private-class-members rule now provides suggestions to remove reported unused private class members.For example, for the following code, in which the rule reports #doSomethingElse as unused:class C { /** * My public method. */ doSomething() { } /** * My private method. */ #doSomethingElse() { }}12345678910111213141516Copy code to clipboard It will now suggest removing #doSomethingElse. After applying the suggestion, the method and related comment will be removed:class C { /** * My public method. */ doSomething() { }}123456789Copy code to clipboard Features379571a feat: add suggestions for no-unused-private-class-members (#20773) (sethamus)Bug Fixesb6ae5cf fix: handle unavailable require cache (#20812) (Simon Podlipsky)6fb3685 fix: rule suggestions cause continuation in class body (#20787) (Milos Djermanovic)Documentation32cc7ab docs: fix typos in docs and comments (#20809) (Tanuj Kanti)7f47937 docs: Update README (GitHu
2ヶ月前

ESLint v10.2.1 released
ESLint Blog
Bug Fixes14be92b fix: model generator yield resumption paths in code path analysis (#20665) (sethamus)84a19d2 fix: no-async-promise-executor false positives for shadowed Promise (#20740) (xbinaryx)af764af fix: clarify language and processor validation errors (#20729) (Pixel998)e251b89 fix: update eslint (#20715) (renovate[bot])Documentationca92ca0 docs: reuse markdown-it instance for markdown filter (#20768) (Amaresh S M)57d2ee2 docs: Enable Eleventy incremental mode for watch (#20767) (Amaresh S M)c1621b9 docs: fix typos in code-path-analyzer.js (#20700) (Ayush Shukla)1418d52 docs: Update README (GitHub Actions Bot)39771e6 docs: Update README (GitHub Actions Bot)71e0469 docs: fix incomplete JSDoc param description in no-shadow rule (#20728) (kuldeep kumar)22119ce docs: clarify scope of for-direction rule with dead code examples (#20723) (Amaresh S M)8f3fb77 docs: document meta.docs.dialects (#20718) (Pixel998)Chores7ddfea9 chore: update dependency prettier to v3.8.2 (#20770) (renovate
2ヶ月前

ESLint v10.2.0 released
ESLint Blog
HighlightsLanguage-aware rulesESLint v10.2.0 adds support for language-aware rules through the new meta.languages property. Rule authors can now explicitly declare which languages a rule supports, and ESLint will throw a runtime error if that rule is enabled for an unsupported language, as specified by the language configuration option.Here is an example of a rule that only supports the JavaScript language:const rule = { meta: { type: "problem", docs: { description: "Example JavaScript rule", }, languages: ["js/js"], }, create(context) { return {}; },};123456789101112Copy code to clipboard Currently, none of the ESLint built-in rules restrict the languages they are designed to work with, but this may change in the future.More information about the meta.languages property can be found in the custom rules documentation.Temporal supportWith the Temporal proposal now at TC39 stage 4, ESLint v10.2.0 recognizes Temporal as a built-in global. As a result, the no-undef rule no longer flags Tem
3ヶ月前

ESLint v10.1.0 released
ESLint Blog
HighlightsAPI Support for Bulk SuppressionsESLint v10.1.0 introduces API support for the bulk suppressions feature that was previously only available in the CLI.ESLint API consumers, such as IDEs, can now pass the applySuppressions: true option to the ESLint constructor. With this option, suppressions from the suppressions file are automatically applied to results from ESLint#lintFiles() and ESLint#lintText() methods.const eslint = new ESLint({ applySuppressions: true, // optional, defaults to `eslint-suppressions.json` suppressionsLocation: "./config/my-suppressions.json",});123456Copy code to clipboard Please see the Bulk Suppressions - Usage with the Node.js API section for more details.Featuresff4382b feat: apply fix for no-var in TSModuleBlock (#20638) (Tanuj Kanti)0916995 feat: Implement api support for bulk-suppressions (#20565) (Blake Sager)Bug Fixes2b8824e fix: Prevent no-var autofix when a variable is used before declaration (#20464) (Amaresh S M)e58b4bf fix: update eslint (#
3ヶ月前

ESLint v9.39.4 released
ESLint Blog
HighlightsThis release sets the minimatch dependency version used in ESLint to ^3.1.5. This change avoids a bug in a previous minimatch release that could cause ESLint to not recognize certain files. A transitive dependency on minimatch was also updated to ^3.1.5 to include a fix for a recently published security issue.Bug Fixesf18f6c8 fix: update dependency minimatch to ^3.1.5 (#20564) (Milos Djermanovic)a3c868f fix: update dependency @eslint/eslintrc to ^3.3.4 (#20554) (Milos Djermanovic)234d005 fix: minimatch security vulnerability patch for v9.x (#20549) (Andrej Beles)b1b37ee fix: update ajv to 6.14.0 to address security vulnerabilities (#20538) (루밀LuMir)Documentation4675152 docs: add deprecation notice partial (#20520) (Milos Djermanovic)Choresb8b4eb1 chore: update dependencies for ESLint v9.39.4 (#20596) (Francesco Trotta)71b2f6b chore: package.json update for @eslint/js release (Jenkins)1d16c2f ci: pin Node.js 25.6.1 (#20563) (Milos Djermanovic)
4ヶ月前

ESLint v10.0.3 released
ESLint Blog
HighlightsThis release sets the minimatch dependency version used in ESLint to ^10.2.4. This change avoids a bug in a previous minimatch release that could cause ESLint to not recognize certain files.Bug Fixese511b58 fix: update eslint (#20595) (renovate[bot])f4c9cf9 fix: include variable name in no-useless-assignment message (#20581) (sethamus)ee9ff31 fix: update dependency minimatch to ^10.2.4 (#20562) (Milos Djermanovic)Documentation9fc31b0 docs: Update README (GitHub Actions Bot)4efaa36 docs: add info box for eslint-plugin-eslint-comments (#20570) (DesselBane)23b2759 docs: add v10 migration guide link to Use docs index (#20577) (Pixel998)80259a9 docs: Remove deprecated eslintrc documentation files (#20472) (Copilot)9b9b4ba docs: fix typo in no-await-in-loop documentation (#20575) (Pixel998)e7d72a7 docs: document TypeScript 5.3 minimum supported version (#20547) (sethamus)Choresef8fb92 chore: package.json update for eslint-config-eslint release (Jenkins)e8f2104 chore: updates for v9
4ヶ月前

ESLint v10.0.2 released
ESLint Blog
HighlightsThis release updates the ajv dependency to v6.14.0 which includes the fix for a recently published security issue.Bug Fixes2b72361 fix: update ajv to 6.14.0 to address security vulnerabilities (#20537) (루밀LuMir)Documentation13eeedb docs: link rule type explanation to CLI option --fix-type (#20548) (Mike McCready)98cbf6b docs: update migration guide per Program range change (#20534) (Huáng Jùnliàng)61a2405 docs: add missing semicolon in vars-on-top rule example (#20533) (Abilash)Chores951223b chore: update dependency @eslint/eslintrc to ^3.3.4 (#20553) (renovate[bot])6aa1afe chore: update dependency eslint-plugin-jsdoc to ^62.7.0 (#20536) (Milos Djermanovic)
4ヶ月前