From fef04b5c7fea99362d67b31b8e98cd4914020ed3 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Wed, 2 Jul 2025 11:33:42 -0400 Subject: [PATCH 01/17] docs: Update working on issues info (#19902) * docs: Update working on issues info fixes #19900 * Update CONTRIBUTING.md * Update docs/src/contribute/work-on-issue.md Co-authored-by: Amaresh S M --------- Co-authored-by: Amaresh S M --- CONTRIBUTING.md | 5 +++- docs/src/contribute/work-on-issue.md | 34 +++++++++++++++++++++------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9eca8d435867..374b1fdca564 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,10 @@ To report a security vulnerability in ESLint, please use our [create an advisory ## Contributing Code -In order to submit code or documentation to an ESLint project, you’ll be asked to sign our CLA when you send your first pull request. (Read more about the OpenJS Foundation CLA process at .) Also, please read over the [Pull Request Guidelines](https://eslint.org/docs/latest/contribute/pull-requests). +In order to submit code or documentation to an ESLint project, you’ll be asked to sign our CLA when you send your first pull request. (Read more about the OpenJS Foundation CLA process at .) Also, please read: + +- [Working on issues](https://eslint.org/docs/latest/contribute/work-on-issue) +- [Pull Request Guidelines](https://eslint.org/docs/latest/contribute/pull-requests) ## Full Documentation diff --git a/docs/src/contribute/work-on-issue.md b/docs/src/contribute/work-on-issue.md index 6d4745f92916..8232a1ef1d9a 100644 --- a/docs/src/contribute/work-on-issue.md +++ b/docs/src/contribute/work-on-issue.md @@ -13,9 +13,10 @@ Our public [issues tracker](https://github.com/eslint/eslint/issues) lists all o We use labels to indicate the status of issues. The most complete documentation on the labels is found in the [Maintain ESLint documentation](../maintain/manage-issues#when-an-issue-or-pull-request-is-opened), but most contributors should find the information on this page sufficient. The most important questions that labels can help you, as a contributor, answer are: -1. Is this issue available for me to work on? If you have little or no experience contributing to ESLint, the [`good first issue`](https://github.com/eslint/eslint/labels/good%20first%20issue) label marks appropriate issues. Otherwise, the [`help wanted`](https://github.com/eslint/eslint/labels/help%20wanted) label is an invitation to work on the issue. If you have more experience, you can try working on other issues labeled [`accepted`](https://github.com/eslint/eslint/labels/accepted). Conversely, issues not yet ready to work on are labeled `triage`, `evaluating`, and/or `needs bikeshedding`, and issues that cannot currently be worked on because of something else, such as a bug in a dependency, are labeled `blocked`. -1. What is this issue about? Labels describing the nature of issues include `bug`, `enhancement`, `feature`, `question`, `rule`, `documentation`, `core`, `build`, `cli`, `infrastructure`, `breaking`, and `chore`. These are documented in [Maintain ESLint](../maintain/manage-issues#types-of-issues-and-pull-requests). -1. What is the priority of this issue? Because we have a lot of issues, we prioritize certain issues above others. The following is the list of priorities, from highest to lowest: +1. **Is this issue ready for a pull request?** Issues that are ready for pull requests have the [`accepted`](https://github.com/eslint/eslint/labels/accepted) label, which indicates that the team has agreed to accept a pull request. Please do not send pull requests for issues that have not been marked as accepted. +2. **Is this issue right for a beginner?** If you have little or no experience contributing to ESLint, the [`good first issue`](https://github.com/eslint/eslint/labels/good%20first%20issue) label marks appropriate issues. Otherwise, the [`help wanted`](https://github.com/eslint/eslint/labels/help%20wanted) label is an invitation to work on the issue. If you have more experience, you can try working on other issues labeled [`accepted`](https://github.com/eslint/eslint/labels/accepted). +3. **What is this issue about?** Labels describing the nature of issues include `bug`, `enhancement`, `feature`, `question`, `rule`, `documentation`, `core`, `build`, `cli`, `infrastructure`, `breaking`, and `chore`. These are documented in [Maintain ESLint](../maintain/manage-issues#types-of-issues-and-pull-requests). +4. **What is the priority of this issue?** Because we have a lot of issues, we prioritize certain issues above others. The following is the list of priorities, from highest to lowest: 1. **Bugs** - problems with the project are actively affecting users. We want to get these resolved as quickly as possible. 1. **Documentation** - documentation issues are a type of bug in that they actively affect current users. As such, we want to address documentation issues as quickly as possible. @@ -23,19 +24,36 @@ We use labels to indicate the status of issues. The most complete documentation 1. **Enhancements** - requested improvements for existing functionality. 1. **Other** - anything else. - Some issues have had monetary rewards attached to them. Those are labeled `bounty`. Bounties are assigned via [BountySource](https://www.bountysource.com/teams/eslint/issues). - ## Starting Work -If you're going to work on an issue, please add a comment to that issue saying so and indicating when you think you will complete it. It will help us to avoid duplication of effort. Some examples of good comments are: +::: important +Before starting to work on an existing issue, please check if the issue has been assigned to anyone. If it has, then that person is already responsible for submitting a pull request and you should choose a different issue to work on. +::: + +### Claiming an issue + +If you're going to work on an issue, please _claim_ the issue by adding a comment saying you're working on it and indicating when you think you will complete it. This helps us to avoid duplication of effort. Some examples of good claim comments are: - "I'll take a look at this over the weekend." - "I'm going to do this, give me two weeks." - "Working on this" (as in, I'm working on it right now) -If an issue has already been claimed by someone, please be respectful of that person's desire to complete the work and don't work on it unless you verify that they are no longer interested. +The team will validate your claim by assigning the issue to you. + +### Offering help on a claimed issue + +If an issue has an assignee or has already been claimed by someone, please be respectful of that person's desire to complete the work and don't work on it unless you verify that they are no longer interested or would welcome the help. If there hasn't been activity on the issue after two weeks, you can express your interest in helping with the issue. For example: + +- "Are you still working on this? If not, I'd love to work on it." +- "Do you need any help on this? I'm interested." + +It is up to the assignee to decide if they're going to continue working on the issue or if they'd like your help. + +If there is no response after a week, please contact a team member for help. + +### Unclaiming an issue -If you find you can't finish the work, then simply add a comment letting people know, for example: +If you claimed an issue and find you can't finish the work, then add a comment letting people know, for example: - "Sorry, it looks like I don't have time to do this." - "I thought I knew enough to fix this, but it turns out I don't." From 5a0069d60815246cf24e1c96125540792c2507ef Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Thu, 3 Jul 2025 08:10:09 +0000 Subject: [PATCH 02/17] docs: Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30c3d6ccb0a9..dc848054f574 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

Qlty Software trunk.io Shopify

Silver Sponsors

Vite Liftoff American Express StackBlitz

Bronze Sponsors

-

Cybozu Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Cybozu Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

From bb370b8e79f65ee32d9d89ecf249fb74a141ad22 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 4 Jul 2025 06:06:15 +0200 Subject: [PATCH 03/17] feat: support explicit resource management in `no-const-assign` (#19892) * feat: support explicit resource management in `no-const-assign` * update When Not To Use It section * fix typo --- docs/src/rules/no-const-assign.md | 45 ++++++++++++++++--- lib/rules/no-const-assign.js | 15 ++++++- lib/types/rules.d.ts | 2 +- tests/lib/rules/no-const-assign.js | 72 +++++++++++++++++++++++++++++- 4 files changed, 124 insertions(+), 10 deletions(-) diff --git a/docs/src/rules/no-const-assign.md b/docs/src/rules/no-const-assign.md index 9f93286ae011..61fa4f9390ab 100644 --- a/docs/src/rules/no-const-assign.md +++ b/docs/src/rules/no-const-assign.md @@ -6,14 +6,11 @@ handled_by_typescript: true -We cannot modify variables that are declared using `const` keyword. -It will raise a runtime error. - -Under non ES2015 environment, it might be ignored merely. +Constant bindings cannot be modified. An attempt to modify a constant binding will raise a runtime error. ## Rule Details -This rule is aimed to flag modifying variables that are declared using `const` keyword. +This rule is aimed to flag modifying variables that are declared using `const`, `using`, or `await using` keywords. Examples of **incorrect** code for this rule: @@ -50,6 +47,24 @@ const a = 0; ::: +::: incorrect + +```js +/*eslint no-const-assign: "error"*/ + +if (foo) { + using a = getSomething(); + a = somethingElse; +} + +if (bar) { + await using a = getSomething(); + a = somethingElse; +} +``` + +::: + Examples of **correct** code for this rule: ::: correct @@ -68,6 +83,24 @@ console.log(a); ```js /*eslint no-const-assign: "error"*/ +if (foo) { + using a = getSomething(); + a.execute(); +} + +if (bar) { + await using a = getSomething(); + a.execute(); +} +``` + +::: + +::: correct + +```js +/*eslint no-const-assign: "error"*/ + for (const a in [1, 2, 3]) { // `a` is re-defined (not modified) on each loop step. console.log(a); } @@ -89,4 +122,4 @@ for (const a of [1, 2, 3]) { // `a` is re-defined (not modified) on each loop st ## When Not To Use It -If you don't want to be notified about modifying variables that are declared using `const` keyword, you can safely disable this rule. +If you don't want to be notified about modifying variables that are declared using `const`, `using`, and `await using` keywords, you can safely disable this rule. diff --git a/lib/rules/no-const-assign.js b/lib/rules/no-const-assign.js index 2f24a504793e..5e126c80e327 100644 --- a/lib/rules/no-const-assign.js +++ b/lib/rules/no-const-assign.js @@ -5,8 +5,18 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -17,7 +27,8 @@ module.exports = { type: "problem", docs: { - description: "Disallow reassigning `const` variables", + description: + "Disallow reassigning `const`, `using`, and `await using` variables", recommended: true, url: "https://eslint.org/docs/latest/rules/no-const-assign", }, @@ -51,7 +62,7 @@ module.exports = { return { VariableDeclaration(node) { - if (node.kind === "const") { + if (CONSTANT_BINDINGS.has(node.kind)) { sourceCode .getDeclaredVariables(node) .forEach(checkVariable); diff --git a/lib/types/rules.d.ts b/lib/types/rules.d.ts index 43974757e197..1cde13386d08 100644 --- a/lib/types/rules.d.ts +++ b/lib/types/rules.d.ts @@ -2126,7 +2126,7 @@ export interface ESLintRules extends Linter.RulesRecord { >; /** - * Rule to disallow reassigning `const` variables. + * Rule to disallow reassigning `const`, `using`, and `await using` variables. * * @remarks * Recommended by ESLint, the rule was enabled in `eslint:recommended`. diff --git a/tests/lib/rules/no-const-assign.js b/tests/lib/rules/no-const-assign.js index 59affb072dd7..739f7d21f1ca 100644 --- a/tests/lib/rules/no-const-assign.js +++ b/tests/lib/rules/no-const-assign.js @@ -16,7 +16,7 @@ const RuleTester = require("../../../lib/rule-tester/rule-tester"); // Tests //------------------------------------------------------------------------------ -const ruleTester = new RuleTester({ languageOptions: { ecmaVersion: 6 } }); +const ruleTester = new RuleTester(); ruleTester.run("no-const-assign", rule, { valid: [ @@ -26,6 +26,10 @@ ruleTester.run("no-const-assign", rule, { "for (const x in [1,2,3]) { foo(x); }", "for (const x of [1,2,3]) { foo(x); }", "const x = {key: 0}; x.key = 1;", + "using x = foo();", + "await using x = foo();", + "using x = foo(); bar(x);", + "await using x = foo(); bar(x);", // ignores non constant. "var x = 0; x = 1;", @@ -115,5 +119,71 @@ ruleTester.run("no-const-assign", rule, { { messageId: "const", data: { name: "x" }, type: "Identifier" }, ], }, + { + code: "using x = foo(); x = 1;", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 18, + }, + ], + }, + { + code: "await using x = foo(); x = 1;", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 24, + }, + ], + }, + { + code: "using x = foo(); x ??= bar();", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 18, + }, + ], + }, + { + code: "await using x = foo(); x ||= bar();", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 24, + }, + ], + }, + { + code: "using x = foo(); [x, y] = bar();", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 19, + }, + ], + }, + { + code: "await using x = foo(); [x = baz, y] = bar();", + errors: [ + { + messageId: "const", + data: { name: "x" }, + type: "Identifier", + column: 25, + }, + ], + }, ], }); From 58482165eaf597cc5c58216a956c301ae87520b3 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 4 Jul 2025 06:15:56 +0200 Subject: [PATCH 04/17] feat: support explicit resource management in `init-declarations` (#19893) --- docs/src/rules/init-declarations.md | 14 ++++++++++++-- lib/rules/init-declarations.js | 4 +++- tests/lib/rules/init-declarations.js | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/docs/src/rules/init-declarations.md b/docs/src/rules/init-declarations.md index 846dd7075a7e..eb00bdda1624 100644 --- a/docs/src/rules/init-declarations.md +++ b/docs/src/rules/init-declarations.md @@ -36,7 +36,7 @@ This rule aims to bring consistency to variable initializations and declarations The rule takes two options: -1. A string which must be either `"always"` (the default), to enforce initialization at declaration, or `"never"` to disallow initialization during declaration. This rule applies to `var`, `let`, and `const` variables, however `"never"` is ignored for `const` variables, as unassigned `const`s generate a parse error. +1. A string which must be either `"always"` (the default), to enforce initialization at declaration, or `"never"` to disallow initialization during declaration. This rule applies to `var`, `let`, `const`, `using`, and `await using` variables, however `"never"` is ignored for `const`, `using`, and `await using` variables, as not initializing these variables would generate a parse error. 2. An object that further controls the behavior of this rule. Currently, the only available parameter is `ignoreForLoopInit`, which indicates if initialization at declaration is allowed in `for` loops when `"never"` is set, since it is a very typical use case. You can configure the rule as follows: @@ -93,6 +93,11 @@ function foo() { var bar = 1; let baz = 2; const qux = 3; + using quux = getSomething(); +} + +async function foobar() { + await using quux = getSomething(); } ``` @@ -128,12 +133,17 @@ function foo() { var bar; let baz; const buzz = 1; + using quux = getSomething(); +} + +async function foobar() { + await using quux = getSomething(); } ``` ::: -The `"never"` option ignores `const` variable initializations. +The `"never"` option ignores `const`, `using`, and `await using` variable initializations. ### ignoreForLoopInit diff --git a/lib/rules/init-declarations.js b/lib/rules/init-declarations.js index e5b976051315..15dac379fada 100644 --- a/lib/rules/init-declarations.js +++ b/lib/rules/init-declarations.js @@ -9,6 +9,8 @@ // Helpers //------------------------------------------------------------------------------ +const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]); + /** * Checks whether or not a given node is a for loop. * @param {ASTNode} block A node to check. @@ -147,7 +149,7 @@ module.exports = { messageId = "initialized"; } else if ( mode === MODE_NEVER && - kind !== "const" && + !CONSTANT_BINDINGS.has(kind) && initialized && !isIgnoredForLoop ) { diff --git a/tests/lib/rules/init-declarations.js b/tests/lib/rules/init-declarations.js index 6cbeb03229f7..089892836dcb 100644 --- a/tests/lib/rules/init-declarations.js +++ b/tests/lib/rules/init-declarations.js @@ -39,6 +39,16 @@ ruleTester.run("init-declarations", rule, { options: ["always"], languageOptions: { ecmaVersion: 6 }, }, + { + code: "using a = foo();", + options: ["always"], + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "await using a = foo();", + options: ["always"], + languageOptions: { ecmaVersion: 2026 }, + }, { code: "function foo() { let a = 1, b = false; if (a) { let c = 3, d = null; } }", options: ["always"], @@ -79,6 +89,16 @@ ruleTester.run("init-declarations", rule, { options: ["never"], languageOptions: { ecmaVersion: 6 }, }, + { + code: "using a = foo();", + options: ["never"], + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "await using a = foo();", + options: ["never"], + languageOptions: { ecmaVersion: 2026 }, + }, { code: "function foo() { let a, b; if (a) { let c, d; } }", options: ["never"], From 4682cdc6960279ee17f23899fbab6f58d881eadf Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 4 Jul 2025 06:27:51 +0200 Subject: [PATCH 05/17] feat: support explicit resource management in `no-undef-init` (#19894) --- docs/src/rules/no-undef-init.md | 8 ++++++-- lib/rules/no-undef-init.js | 12 +++++++++++- tests/lib/rules/no-undef-init.js | 8 ++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/src/rules/no-undef-init.md b/docs/src/rules/no-undef-init.md index 31f40592a46f..8c94efcf5146 100644 --- a/docs/src/rules/no-undef-init.md +++ b/docs/src/rules/no-undef-init.md @@ -54,7 +54,7 @@ let bar; ::: -Please note that this rule does not check `const` declarations, destructuring patterns, function parameters, and class fields. +Please note that this rule does not check `const` declarations, `using` declarations, `await using` declarations, destructuring patterns, function parameters, and class fields. Examples of additional **correct** code for this rule: @@ -65,6 +65,10 @@ Examples of additional **correct** code for this rule: const foo = undefined; +using foo1 = undefined; + +await using foo2 = undefined; + let { bar = undefined } = baz; [quux = undefined] = quuux; @@ -159,7 +163,7 @@ Another such case is when a variable is redeclared using `var`. For example: function foo() { var x = 1; console.log(x); // output: 1 - + var x; console.log(x); // output: 1 diff --git a/lib/rules/no-undef-init.js b/lib/rules/no-undef-init.js index 9f8153d329f9..77a120043e2c 100644 --- a/lib/rules/no-undef-init.js +++ b/lib/rules/no-undef-init.js @@ -5,8 +5,18 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -49,7 +59,7 @@ module.exports = { if ( init === "undefined" && - node.parent.kind !== "const" && + !CONSTANT_BINDINGS.has(node.parent.kind) && !shadowed ) { context.report({ diff --git a/tests/lib/rules/no-undef-init.js b/tests/lib/rules/no-undef-init.js index a201d2769719..0fc937c2738f 100644 --- a/tests/lib/rules/no-undef-init.js +++ b/tests/lib/rules/no-undef-init.js @@ -22,6 +22,14 @@ ruleTester.run("no-undef-init", rule, { valid: [ "var a;", { code: "const foo = undefined", languageOptions: { ecmaVersion: 6 } }, + { + code: "using foo = undefined", + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "await using foo = undefined", + languageOptions: { ecmaVersion: 2026 }, + }, "var undefined = 5; var foo = undefined;", // doesn't apply to class fields From a6a63259de6cb5642f69c7be429554bbcedca4c0 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 4 Jul 2025 06:40:19 +0200 Subject: [PATCH 06/17] feat: support explicit resource management in `no-loop-func` (#19895) * feat: support explicit resource management in `no-loop-func` * replace tabs with spaces --- docs/src/rules/no-loop-func.md | 28 ++++++++++++++ lib/rules/no-loop-func.js | 6 ++- tests/lib/rules/no-loop-func.js | 68 +++++++++++++++++++++++++++++---- 3 files changed, 92 insertions(+), 10 deletions(-) diff --git a/docs/src/rules/no-loop-func.md b/docs/src/rules/no-loop-func.md index c12971086520..549807b8b398 100644 --- a/docs/src/rules/no-loop-func.md +++ b/docs/src/rules/no-loop-func.md @@ -115,6 +115,34 @@ for (let i=10; i; i--) { a(); } +for (const i of foo) { + var a = function() { return i; }; // OK, all references are referring to block scoped variables in the loop. + a(); +} + +for (using i of foo) { + var a = function() { return i; }; // OK, all references are referring to block scoped variables in the loop. + a(); +} + +for (var i=10; i; i--) { + const foo = getsomething(i); + var a = function() { return foo; }; // OK, all references are referring to block scoped variables in the loop. + a(); +} + +for (var i=10; i; i--) { + using foo = getsomething(i); + var a = function() { return foo; }; // OK, all references are referring to block scoped variables in the loop. + a(); +} + +for (var i=10; i; i--) { + await using foo = getsomething(i); + var a = function() { return foo; }; // OK, all references are referring to block scoped variables in the loop. + a(); +} + var foo = 100; for (let i=10; i; i--) { var a = function() { return foo; }; // OK, all references are referring to never modified variables. diff --git a/lib/rules/no-loop-func.js b/lib/rules/no-loop-func.js index 5403bd5cd7ae..df6c8c5ecc74 100644 --- a/lib/rules/no-loop-func.js +++ b/lib/rules/no-loop-func.js @@ -9,6 +9,8 @@ // Helpers //------------------------------------------------------------------------------ +const CONSTANT_BINDINGS = new Set(["const", "using", "await using"]); + /** * Identifies is a node is a FunctionExpression which is part of an IIFE * @param {ASTNode} node Node to test @@ -148,8 +150,8 @@ module.exports = { ? declaration.kind : ""; - // Variables which are declared by `const` is safe. - if (kind === "const") { + // Constant variables are safe. + if (CONSTANT_BINDINGS.has(kind)) { return true; } diff --git a/tests/lib/rules/no-loop-func.js b/tests/lib/rules/no-loop-func.js index 1048596f5e27..0c9a7ccff42f 100644 --- a/tests/lib/rules/no-loop-func.js +++ b/tests/lib/rules/no-loop-func.js @@ -50,6 +50,22 @@ ruleTester.run("no-loop-func", rule, { code: "for (const i of {}) { (function() { i; }) }", languageOptions: { ecmaVersion: 6 }, }, + { + code: "for (using i of foo) { (function() { i; }) }", + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "for (await using i of foo) { (function() { i; }) }", + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "for (var i = 0; i < 10; ++i) { using foo = bar(i); (function() { foo; }) }", + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: "for (var i = 0; i < 10; ++i) { await using foo = bar(i); (function() { foo; }) }", + languageOptions: { ecmaVersion: 2026 }, + }, { code: "for (let i = 0; i < 10; ++i) { for (let x in xs.filter(x => x != i)) { } }", languageOptions: { ecmaVersion: 6 }, @@ -170,7 +186,7 @@ ruleTester.run("no-loop-func", rule, { current.c; current.d; })(); - + current = current.upper; } `, @@ -208,6 +224,42 @@ ruleTester.run("no-loop-func", rule, { `, languageOptions: { ecmaVersion: 6 }, }, + { + code: ` + const foo = bar; + + for (var i = 0; i < 5; i++) { + arr.push(() => foo); + } + + foo = baz; // This is a runtime error, but not concern of this rule. For this rule, variable 'foo' is constant. + `, + languageOptions: { ecmaVersion: 6 }, + }, + { + code: ` + using foo = bar; + + for (var i = 0; i < 5; i++) { + arr.push(() => foo); + } + + foo = baz; // This is a runtime error, but not concern of this rule. For this rule, variable 'foo' is constant. + `, + languageOptions: { ecmaVersion: 2026 }, + }, + { + code: ` + await using foo = bar; + + for (var i = 0; i < 5; i++) { + arr.push(() => foo); + } + + foo = baz; // This is a runtime error, but not concern of this rule. For this rule, variable 'foo' is constant. + `, + languageOptions: { ecmaVersion: 2026 }, + }, ], invalid: [ { @@ -471,7 +523,7 @@ ruleTester.run("no-loop-func", rule, { current; arr.push(f); })(); - + current = current.upper; } `, @@ -615,7 +667,7 @@ ruleTester.run("no-loop-func", rule, { for (var i = 0; i < 5; i++) { arr.push((() => { - return () => + return () => (() => i)(); })()); } @@ -666,7 +718,7 @@ ruleTester.run("no-loop-func", rule, { return i; })(); })(); - + } `, languageOptions: { ecmaVersion: 2022 }, @@ -839,7 +891,7 @@ ruleTesterTypeScript.run("no-loop-func", rule, { // ConfiguredType is in globals, UnconfiguredType is not // Both should be considered safe as they are type references const process = (configItem: ConfiguredType, unconfigItem: UnconfiguredType) => { - return { + return { config: configItem.value, unconfig: unconfigItem.value }; @@ -892,14 +944,14 @@ ruleTesterTypeScript.run("no-loop-func", rule, { id: number; name: string; } - + const items: Item[] = []; for (var i = 0; i < 10; i++) { items.push({ id: i, name: "Item " + i }); - + const process = function(callback: (item: Item) => void): void { callback({ id: i, name: "Item " + i }); }; @@ -916,7 +968,7 @@ ruleTesterTypeScript.run("no-loop-func", rule, { { code: ` type Processor = (item: T) => void; - + for (var i = 0; i < 10; i++) { const processor: Processor = (item) => { return item + i; From 28cc7abbb72b29b1cac6fc4253646a7839586064 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Fri, 4 Jul 2025 00:53:19 -0400 Subject: [PATCH 07/17] fix: Remove incorrect RuleContext types (#19910) fixes #19903 --- lib/types/index.d.ts | 20 +------------------- tests/lib/types/types.test.ts | 8 -------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index 8723088dffa6..8c816338444f 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -1186,25 +1186,7 @@ export namespace Rule { RuleOptions: any[]; Node: JSSyntaxElement; MessageIds: string; - }> { - /* - * Need to extend the `RuleContext` interface to include the - * deprecated methods that have not yet been removed. - * TODO: Remove in v10.0.0. - */ - - /** @deprecated Use `sourceCode.getAncestors()` instead */ - getAncestors(): ESTree.Node[]; - - /** @deprecated Use `sourceCode.getDeclaredVariables()` instead */ - getDeclaredVariables(node: ESTree.Node): Scope.Variable[]; - - /** @deprecated Use `sourceCode.getScope()` instead */ - getScope(): Scope.Scope; - - /** @deprecated Use `sourceCode.markVariableAsUsed()` instead */ - markVariableAsUsed(name: string): boolean; - } + }> {} type ReportFixer = ( fixer: RuleFixer, diff --git a/tests/lib/types/types.test.ts b/tests/lib/types/types.test.ts index ceb7392c5bee..f55f1bf36bcf 100644 --- a/tests/lib/types/types.test.ts +++ b/tests/lib/types/types.test.ts @@ -625,10 +625,6 @@ rule = { rule = { create(context: Rule.RuleContext) { - context.getAncestors(); - - context.getDeclaredVariables(AST); - context.filename; context.getFilename(); @@ -653,16 +649,12 @@ rule = { context.getSourceCode(); context.getSourceCode().getLocFromIndex(42); - context.getScope(); - if (typeof context.parserPath === "string") { context.parserPath; } else { context.languageOptions?.parser; } - context.markVariableAsUsed("foo"); - // @ts-expect-error wrong `node` type context.report({ message: "foo", node: {} }); From 76c2340c368f96db77439b5cd1df0196cc39bf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 7 Jul 2025 20:34:11 +0900 Subject: [PATCH 08/17] chore: bump mocha to v11 (#19917) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba7a14eea552..26bbb22c4843 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "metascraper-logo": "^5.25.7", "metascraper-logo-favicon": "^5.25.7", "metascraper-title": "^5.25.7", - "mocha": "^10.7.3", + "mocha": "^11.7.1", "node-polyfill-webpack-plugin": "^1.0.3", "npm-license": "^0.3.3", "pirates": "^4.0.5", From 40dbe2a43f83d366e9026faec70293512fb61ca2 Mon Sep 17 00:00:00 2001 From: MaoShizhong <122839503+MaoShizhong@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:33:40 +0100 Subject: [PATCH 09/17] docs: fix mismatch between `globalIgnores()` code and text (#19914) docs: Update paragraphs to reference globalIgnores() helper examples --- docs/src/use/configure/ignore.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/use/configure/ignore.md b/docs/src/use/configure/ignore.md index c3c3ef5a50df..9aee7606d5e4 100644 --- a/docs/src/use/configure/ignore.md +++ b/docs/src/use/configure/ignore.md @@ -23,7 +23,7 @@ You can configure ESLint to ignore certain files and directories while linting b ## Ignoring Files -In your `eslint.config.js` file, if an `ignores` key is used without any other keys in the configuration object, then the patterns act as global ignores. Here's an example: +In your `eslint.config.js` file, you can use the `globalIgnores()` helper function to indicate patterns of files to be ignored. Here's an example: ```js // eslint.config.js @@ -43,7 +43,7 @@ You can also ignore files on the command line using [`--ignore-pattern`](../comm ## Ignoring Directories -Ignoring directories works the same way as ignoring files, by placing a pattern in the `ignores` key of a configuration object with no other keys. For example, the following ignores the `.config` directory as a whole (meaning file search will not traverse into it at all): +Ignoring directories works the same way as ignoring files, by passing a pattern to the `globalIgnores()` helper function. For example, the following ignores the `.config` directory as a whole (meaning file search will not traverse into it at all): ```js // eslint.config.js @@ -127,8 +127,8 @@ You can also unignore files on the command line using [`--ignore-pattern`](../co How glob patterns are evaluated depends on where they are located and how they are used: -1. When using `ignores` in an `eslint.config.js` file, glob patterns are evaluated relative to the `eslint.config.js` file. -1. When using `ignores` in an alternate configuration file specified using the [`--config`](../command-line-interface#-c---config) command line option, glob patterns are evaluated relative to the current working directory. +1. When using `globalIgnores()` in an `eslint.config.js` file, glob patterns are evaluated relative to the `eslint.config.js` file. +1. When using `globalIgnores()` in an alternate configuration file specified using the [`--config`](../command-line-interface#-c---config) command line option, glob patterns are evaluated relative to the current working directory. 1. When using [`--ignore-pattern`](../command-line-interface#--ignore-pattern), glob patterns are evaluated relative to the current working directory. ## Name the Global Ignores Config From 35cf44c22e36b1554486e7a75c870e86c10b83f8 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 7 Jul 2025 20:35:56 +0200 Subject: [PATCH 10/17] feat: output full actual location in rule tester if different (#19904) * test: output full location in rule tester * refactor: treat lcoation as atomic unit * refactor: use default assertion message * Update lib/rule-tester/rule-tester.js Co-authored-by: Milos Djermanovic * test: update expected error message --------- Co-authored-by: Milos Djermanovic --- lib/rule-tester/rule-tester.js | 37 ++++++++++++++-------------- tests/lib/rule-tester/rule-tester.js | 15 ++++++----- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/lib/rule-tester/rule-tester.js b/lib/rule-tester/rule-tester.js index 382a3d19e8e0..dbd8c274f0fc 100644 --- a/lib/rule-tester/rule-tester.js +++ b/lib/rule-tester/rule-tester.js @@ -1236,35 +1236,34 @@ class RuleTester { ); } + const actualLocation = {}; + const expectedLocation = {}; + if (hasOwnProperty(error, "line")) { - assert.strictEqual( - message.line, - error.line, - `Error line should be ${error.line}`, - ); + actualLocation.line = message.line; + expectedLocation.line = error.line; } if (hasOwnProperty(error, "column")) { - assert.strictEqual( - message.column, - error.column, - `Error column should be ${error.column}`, - ); + actualLocation.column = message.column; + expectedLocation.column = error.column; } if (hasOwnProperty(error, "endLine")) { - assert.strictEqual( - message.endLine, - error.endLine, - `Error endLine should be ${error.endLine}`, - ); + actualLocation.endLine = message.endLine; + expectedLocation.endLine = error.endLine; } if (hasOwnProperty(error, "endColumn")) { - assert.strictEqual( - message.endColumn, - error.endColumn, - `Error endColumn should be ${error.endColumn}`, + actualLocation.endColumn = message.endColumn; + expectedLocation.endColumn = error.endColumn; + } + + if (Object.keys(expectedLocation).length > 0) { + assert.deepStrictEqual( + actualLocation, + expectedLocation, + "Actual error location does not match expected error location.", ); } diff --git a/tests/lib/rule-tester/rule-tester.js b/tests/lib/rule-tester/rule-tester.js index 1018ab7ac43e..74137086085a 100644 --- a/tests/lib/rule-tester/rule-tester.js +++ b/tests/lib/rule-tester/rule-tester.js @@ -1292,7 +1292,7 @@ describe("RuleTester", () => { ], }, ); - }, /Error line should be 5/u); + }, "Actual error location does not match expected error location."); }); it("should not skip line assertion if line is a falsy value", () => { @@ -1316,12 +1316,11 @@ describe("RuleTester", () => { ], }, ); - }, /Error line should be 0/u); + }, "Actual error location does not match expected error location."); }); it("should throw an error if invalid code specifies wrong column", () => { - const wrongColumn = 10, - expectedErrorMessage = "Error column should be 1"; + const wrongColumn = 10; assert.throws(() => { ruleTester.run( @@ -1342,7 +1341,7 @@ describe("RuleTester", () => { ], }, ); - }, expectedErrorMessage); + }, "Actual error location does not match expected error location."); }); it("should throw error for empty error array", () => { @@ -1398,7 +1397,7 @@ describe("RuleTester", () => { ], }, ); - }, /Error column should be 0/u); + }, "Actual error location does not match expected error location."); }); it("should throw an error if invalid code specifies wrong endLine", () => { @@ -1423,7 +1422,7 @@ describe("RuleTester", () => { ], }, ); - }, "Error endLine should be 10"); + }, "Actual error location does not match expected error location."); }); it("should throw an error if invalid code specifies wrong endColumn", () => { @@ -1448,7 +1447,7 @@ describe("RuleTester", () => { ], }, ); - }, "Error endColumn should be 10"); + }, "Actual error location does not match expected error location."); }); it("should throw an error if invalid code has the wrong number of errors", () => { From 07fac6cafa0426b4d1ea12d9001f3955f19b286d Mon Sep 17 00:00:00 2001 From: TKDev7 Date: Thu, 10 Jul 2025 07:14:14 +0300 Subject: [PATCH 11/17] fix: retry on EMFILE when writing autofix results (#19926) * fix: retry on EMFILE when writing autofix results * chore: update test --- lib/eslint/eslint.js | 9 ++++++++- tests/fixtures/emfile/eslint.config.js | 2 +- tools/check-emfile-handling.js | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/eslint/eslint.js b/lib/eslint/eslint.js index 99bddf2bc864..7f75fc3a844a 100644 --- a/lib/eslint/eslint.js +++ b/lib/eslint/eslint.js @@ -530,6 +530,11 @@ class ESLint { throw new Error("'results' must be an array"); } + const retryCodes = new Set(["ENFILE", "EMFILE"]); + const retrier = new Retrier(error => retryCodes.has(error.code), { + concurrency: 100, + }); + await Promise.all( results .filter(result => { @@ -541,7 +546,9 @@ class ESLint { path.isAbsolute(result.filePath) ); }) - .map(r => fs.writeFile(r.filePath, r.output)), + .map(r => + retrier.retry(() => fs.writeFile(r.filePath, r.output)), + ), ); } diff --git a/tests/fixtures/emfile/eslint.config.js b/tests/fixtures/emfile/eslint.config.js index bdfb8f7349f6..41737b47204d 100644 --- a/tests/fixtures/emfile/eslint.config.js +++ b/tests/fixtures/emfile/eslint.config.js @@ -1,5 +1,5 @@ module.exports = { rules: { - "no-unused-vars": "error" + "capitalized-comments": "error" } }; diff --git a/tools/check-emfile-handling.js b/tools/check-emfile-handling.js index 79716ba8a333..8326fa8189c2 100644 --- a/tools/check-emfile-handling.js +++ b/tools/check-emfile-handling.js @@ -63,7 +63,7 @@ function generateFiles() { for (let i = 0; i < FILE_COUNT; i++) { const fileName = `file_${i}.js`; - const fileContent = `// This is file ${i}`; + const fileContent = `// this is file ${i}`; fs.writeFileSync(`${OUTPUT_DIRECTORY}/${fileName}`, fileContent); } @@ -97,7 +97,7 @@ generateFiles(); console.log("Running ESLint..."); execSync( - `node bin/eslint.js ${OUTPUT_DIRECTORY} -c ${CONFIG_DIRECTORY}/eslint.config.js`, + `node bin/eslint.js ${OUTPUT_DIRECTORY} -c ${CONFIG_DIRECTORY}/eslint.config.js --fix`, { stdio: "inherit" }, ); console.log("✅ No errors encountered running ESLint."); From 664cb44ab03785bd200a792607a7e20faa2d4b28 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Thu, 10 Jul 2025 08:10:29 +0000 Subject: [PATCH 12/17] docs: Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dc848054f574..522cc9faf2da 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).

Automattic Airbnb

Gold Sponsors

Qlty Software trunk.io Shopify

Silver Sponsors

Vite Liftoff American Express StackBlitz

Bronze Sponsors

-

Cybozu Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

+

Cybozu Sentry Anagram Solver Icons8 Discord GitBook Nx Mercedes-Benz Group HeroCoders LambdaTest

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

From 0f4a3781fe7c11fad7b206c3c694655486ddd187 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 21:44:46 +0200 Subject: [PATCH 13/17] chore: update eslint (#19933) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 26bbb22c4843..72303f587aea 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.0", - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.0", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.30.1", "@eslint/plugin-kit": "^0.3.1", @@ -145,7 +145,7 @@ "@babel/core": "^7.4.3", "@babel/preset-env": "^7.4.3", "@cypress/webpack-preprocessor": "^6.0.2", - "@eslint/json": "^0.12.0", + "@eslint/json": "^0.13.0", "@trunkio/launcher": "^1.3.4", "@types/esquery": "^1.5.4", "@types/node": "^22.13.14", From d5054e5454a537e9ade238c768c262c6c592cbc1 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Fri, 11 Jul 2025 20:05:28 +0000 Subject: [PATCH 14/17] chore: package.json update for @eslint/js release --- packages/js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/package.json b/packages/js/package.json index db572d449568..7d7394b3f90a 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -1,6 +1,6 @@ { "name": "@eslint/js", - "version": "9.30.1", + "version": "9.31.0", "description": "ESLint JavaScript language implementation", "funding": "https://eslint.org/donate", "main": "./src/index.js", From 3ddd454c1c73294e5af7905d60d03fac162f1b3e Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Fri, 11 Jul 2025 22:22:06 +0200 Subject: [PATCH 15/17] chore: upgrade to `@eslint/js@9.31.0` (#19935) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72303f587aea..efa6abf8a558 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.15.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.30.1", + "@eslint/js": "9.31.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", From 2b77bd05dc50911bc97b2d2711dd75f6b5d9b9fd Mon Sep 17 00:00:00 2001 From: Jenkins Date: Fri, 11 Jul 2025 20:33:46 +0000 Subject: [PATCH 16/17] Build: changelog update for 9.31.0 --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbaf72830d87..a92a2ca3b9e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +v9.31.0 - July 11, 2025 + +* [`3ddd454`](https://github.com/eslint/eslint/commit/3ddd454c1c73294e5af7905d60d03fac162f1b3e) chore: upgrade to `@eslint/js@9.31.0` (#19935) (Francesco Trotta) +* [`d5054e5`](https://github.com/eslint/eslint/commit/d5054e5454a537e9ade238c768c262c6c592cbc1) chore: package.json update for @eslint/js release (Jenkins) +* [`0f4a378`](https://github.com/eslint/eslint/commit/0f4a3781fe7c11fad7b206c3c694655486ddd187) chore: update eslint (#19933) (renovate[bot]) +* [`664cb44`](https://github.com/eslint/eslint/commit/664cb44ab03785bd200a792607a7e20faa2d4b28) docs: Update README (GitHub Actions Bot) +* [`07fac6c`](https://github.com/eslint/eslint/commit/07fac6cafa0426b4d1ea12d9001f3955f19b286d) fix: retry on EMFILE when writing autofix results (#19926) (TKDev7) +* [`35cf44c`](https://github.com/eslint/eslint/commit/35cf44c22e36b1554486e7a75c870e86c10b83f8) feat: output full actual location in rule tester if different (#19904) (ST-DDT) +* [`40dbe2a`](https://github.com/eslint/eslint/commit/40dbe2a43f83d366e9026faec70293512fb61ca2) docs: fix mismatch between `globalIgnores()` code and text (#19914) (MaoShizhong) +* [`76c2340`](https://github.com/eslint/eslint/commit/76c2340c368f96db77439b5cd1df0196cc39bf3e) chore: bump mocha to v11 (#19917) (루밀LuMir) +* [`28cc7ab`](https://github.com/eslint/eslint/commit/28cc7abbb72b29b1cac6fc4253646a7839586064) fix: Remove incorrect RuleContext types (#19910) (Nicholas C. Zakas) +* [`a6a6325`](https://github.com/eslint/eslint/commit/a6a63259de6cb5642f69c7be429554bbcedca4c0) feat: support explicit resource management in `no-loop-func` (#19895) (Milos Djermanovic) +* [`4682cdc`](https://github.com/eslint/eslint/commit/4682cdc6960279ee17f23899fbab6f58d881eadf) feat: support explicit resource management in `no-undef-init` (#19894) (Milos Djermanovic) +* [`5848216`](https://github.com/eslint/eslint/commit/58482165eaf597cc5c58216a956c301ae87520b3) feat: support explicit resource management in `init-declarations` (#19893) (Milos Djermanovic) +* [`bb370b8`](https://github.com/eslint/eslint/commit/bb370b8e79f65ee32d9d89ecf249fb74a141ad22) feat: support explicit resource management in `no-const-assign` (#19892) (Milos Djermanovic) +* [`5a0069d`](https://github.com/eslint/eslint/commit/5a0069d60815246cf24e1c96125540792c2507ef) docs: Update README (GitHub Actions Bot) +* [`fef04b5`](https://github.com/eslint/eslint/commit/fef04b5c7fea99362d67b31b8e98cd4914020ed3) docs: Update working on issues info (#19902) (Nicholas C. Zakas) + v9.30.1 - July 1, 2025 * [`b035f74`](https://github.com/eslint/eslint/commit/b035f747c6e6d1c7a299c90b0ed0b8109cf24a53) chore: upgrade to `@eslint/js@9.30.1` (#19906) (Francesco Trotta) From 14053edc64bd378ab920575f2488fbfcbb5a4ea0 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Fri, 11 Jul 2025 20:33:46 +0000 Subject: [PATCH 17/17] 9.31.0 --- docs/package.json | 2 +- docs/src/_data/rules.json | 2 +- docs/src/_data/rules_meta.json | 2 +- docs/src/_data/versions.json | 2 +- docs/src/use/formatters/html-formatter-example.html | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/package.json b/docs/package.json index 6698ecb58371..3194255ff85c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "docs-eslint", "private": true, - "version": "9.30.1", + "version": "9.31.0", "description": "", "main": "index.js", "keywords": [], diff --git a/docs/src/_data/rules.json b/docs/src/_data/rules.json index a1f5e2e2ea45..b88c8da9ca7f 100644 --- a/docs/src/_data/rules.json +++ b/docs/src/_data/rules.json @@ -75,7 +75,7 @@ }, { "name": "no-const-assign", - "description": "Disallow reassigning `const` variables", + "description": "Disallow reassigning `const`, `using`, and `await using` variables", "recommended": true, "fixable": false, "frozen": false, diff --git a/docs/src/_data/rules_meta.json b/docs/src/_data/rules_meta.json index e262db98852f..5e240ae89314 100644 --- a/docs/src/_data/rules_meta.json +++ b/docs/src/_data/rules_meta.json @@ -1795,7 +1795,7 @@ "no-const-assign": { "type": "problem", "docs": { - "description": "Disallow reassigning `const` variables", + "description": "Disallow reassigning `const`, `using`, and `await using` variables", "recommended": true, "url": "https://eslint.org/docs/latest/rules/no-const-assign" } diff --git a/docs/src/_data/versions.json b/docs/src/_data/versions.json index df8e8b46d1eb..fa517d3ed27a 100644 --- a/docs/src/_data/versions.json +++ b/docs/src/_data/versions.json @@ -6,7 +6,7 @@ "path": "/docs/head/" }, { - "version": "9.30.1", + "version": "9.31.0", "branch": "latest", "path": "/docs/latest/" }, diff --git a/docs/src/use/formatters/html-formatter-example.html b/docs/src/use/formatters/html-formatter-example.html index b3c742130bcd..af978fa7e64b 100644 --- a/docs/src/use/formatters/html-formatter-example.html +++ b/docs/src/use/formatters/html-formatter-example.html @@ -118,7 +118,7 @@

ESLint Report

- 8 problems (4 errors, 4 warnings) - Generated on Tue Jul 01 2025 20:11:40 GMT+0000 (Coordinated Universal Time) + 8 problems (4 errors, 4 warnings) - Generated on Fri Jul 11 2025 20:33:47 GMT+0000 (Coordinated Universal Time)
diff --git a/package.json b/package.json index efa6abf8a558..30e6627a086d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "9.30.1", + "version": "9.31.0", "author": "Nicholas C. Zakas ", "description": "An AST-based pattern checker for JavaScript.", "type": "commonjs",