Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Add no-misused-new rule #1963

Merged
merged 2 commits into from
Jan 16, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename to no-misused-new
  • Loading branch information
andy-hanson committed Jan 5, 2017
commit 5af075f30e8d08d9f1cb3647c05c2cc86234f05b
22 changes: 11 additions & 11 deletions docs/_data/rules.json
Original file line number Diff line number Diff line change
@@ -475,17 +475,6 @@
"type": "typescript",
"typescriptOnly": true
},
{
"ruleName": "misused-new",
"description": "Warns on apparent attempts to define constructors for interfaces or `new` for classes.",
"optionsDescription": "Not configurable.",
"options": null,
"optionExamples": [
"true"
],
"type": "functionality",
"typescriptOnly": true
},
{
"ruleName": "new-parens",
"description": "Requires parentheses when invoking a constructor via the `new` keyword.",
@@ -791,6 +780,17 @@
"type": "maintainability",
"typescriptOnly": true
},
{
"ruleName": "no-misused-new",
"description": "Warns on apparent attempts to define constructors for interfaces or `new` for classes.",
"optionsDescription": "Not configurable.",
"options": null,
"optionExamples": [
"true"
],
"type": "functionality",
"typescriptOnly": true
},
{
"ruleName": "no-namespace",
"description": "Disallows use of internal `module`s and `namespace`s.",
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ruleName: misused-new
ruleName: no-misused-new
description: Warns on apparent attempts to define constructors for interfaces or `new` for classes.
optionsDescription: Not configurable.
options: null
@@ -8,6 +8,6 @@
type: functionality
typescriptOnly: true
layout: rule
title: 'Rule: misused-new'
title: 'Rule: no-misused-new'
optionsJSON: 'null'
---
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ import * as Lint from "../index";
export class Rule extends Lint.Rules.AbstractRule {
/* tslint:disable:object-literal-sort-keys */
public static metadata: Lint.IRuleMetadata = {
ruleName: "misused-new",
ruleName: "no-misused-new",
description: "Warns on apparent attempts to define constructors for interfaces or `new` for classes.",
optionsDescription: "Not configurable.",
options: null,
5 changes: 0 additions & 5 deletions test/rules/misused-new/tslint.json

This file was deleted.

5 changes: 5 additions & 0 deletions test/rules/no-misused-new/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-misused-new": true
}
}