diff --git a/docs/src/rules/no-new-nonconstructor.md b/docs/src/rules/no-new-native-nonconstructor.md similarity index 93% rename from docs/src/rules/no-new-nonconstructor.md rename to docs/src/rules/no-new-native-nonconstructor.md index 5c4e4d26803..580e0aed7d1 100644 --- a/docs/src/rules/no-new-nonconstructor.md +++ b/docs/src/rules/no-new-native-nonconstructor.md @@ -1,5 +1,5 @@ --- -title: no-new-nonconstructor +title: no-new-native-nonconstructor layout: doc rule_type: problem related_rules: @@ -37,7 +37,7 @@ Examples of **incorrect** code for this rule: ::: incorrect ```js -/*eslint no-new-nonconstructor: "error"*/ +/*eslint no-new-native-nonconstructor: "error"*/ /*eslint-env es2022*/ var foo = new Symbol('foo'); diff --git a/lib/rules/index.js b/lib/rules/index.js index 02eed58e590..ddd28b49a18 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -167,7 +167,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-nested-ternary": () => require("./no-nested-ternary"), "no-new": () => require("./no-new"), "no-new-func": () => require("./no-new-func"), - "no-new-nonconstructor": () => require("./no-new-nonconstructor"), + "no-new-native-nonconstructor": () => require("./no-new-native-nonconstructor"), "no-new-object": () => require("./no-new-object"), "no-new-require": () => require("./no-new-require"), "no-new-symbol": () => require("./no-new-symbol"), diff --git a/lib/rules/no-new-nonconstructor.js b/lib/rules/no-new-native-nonconstructor.js similarity index 96% rename from lib/rules/no-new-nonconstructor.js rename to lib/rules/no-new-native-nonconstructor.js index 5215d45fc0f..b4e870e5375 100644 --- a/lib/rules/no-new-nonconstructor.js +++ b/lib/rules/no-new-native-nonconstructor.js @@ -23,7 +23,7 @@ module.exports = { docs: { description: "Disallow `new` operators with global no constructor functions", recommended: false, - url: "https://eslint.org/docs/rules/no-new-nonconstructor" + url: "https://eslint.org/docs/rules/no-new-native-nonconstructor" }, schema: [], diff --git a/tests/lib/rules/no-new-nonconstructor.js b/tests/lib/rules/no-new-native-nonconstructor.js similarity index 90% rename from tests/lib/rules/no-new-nonconstructor.js rename to tests/lib/rules/no-new-native-nonconstructor.js index 120724ed9f5..9637ad79959 100644 --- a/tests/lib/rules/no-new-nonconstructor.js +++ b/tests/lib/rules/no-new-native-nonconstructor.js @@ -1,5 +1,5 @@ /** - * @fileoverview Tests for the no-new-nonconstructor rule + * @fileoverview Tests for the no-new-native-nonconstructor rule * @author Sosuke Suzuki */ @@ -9,7 +9,7 @@ // Requirements //------------------------------------------------------------------------------ -const rule = require("../../../lib/rules/no-new-nonconstructor"), +const rule = require("../../../lib/rules/no-new-native-nonconstructor"), { RuleTester } = require("../../../lib/rule-tester"); //------------------------------------------------------------------------------ @@ -18,7 +18,7 @@ const rule = require("../../../lib/rules/no-new-nonconstructor"), const ruleTester = new RuleTester({ env: { es2022: true } }); -ruleTester.run("no-new-nonconstructor", rule, { +ruleTester.run("no-new-native-nonconstructor", rule, { valid: [ // Symbol diff --git a/tools/rule-types.json b/tools/rule-types.json index 8ee5c958110..2ce5a326960 100644 --- a/tools/rule-types.json +++ b/tools/rule-types.json @@ -154,7 +154,7 @@ "no-nested-ternary": "suggestion", "no-new": "suggestion", "no-new-func": "suggestion", - "no-new-nonconstructor": "problem", + "no-new-native-nonconstructor": "problem", "no-new-object": "suggestion", "no-new-require": "suggestion", "no-new-symbol": "problem",