Skip to content

Commit

Permalink
fix: rename no-new-nonconstructor -> no-new-native-nonconstructor
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Oct 26, 2022
1 parent e1138b4 commit b79aac4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
@@ -1,5 +1,5 @@
---
title: no-new-nonconstructor
title: no-new-native-nonconstructor
layout: doc
rule_type: problem
related_rules:
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/index.js
Expand Up @@ -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"),
Expand Down
Expand Up @@ -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: [],
Expand Down
@@ -1,5 +1,5 @@
/**
* @fileoverview Tests for the no-new-nonconstructor rule
* @fileoverview Tests for the no-new-native-nonconstructor rule
* @author Sosuke Suzuki
*/

Expand All @@ -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");

//------------------------------------------------------------------------------
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/rule-types.json
Expand Up @@ -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",
Expand Down

0 comments on commit b79aac4

Please sign in to comment.