This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 887
Add no-misused-new
rule
#1963
Merged
nchen63
merged 2 commits into
palantir:master
from
andy-hanson:no_interface_constructor
Jan 16, 2017
Merged
Add no-misused-new
rule
#1963
nchen63
merged 2 commits into
palantir:master
from
andy-hanson:no_interface_constructor
Jan 16, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andy-hanson
force-pushed
the
no_interface_constructor
branch
from
January 2, 2017 02:25
4c3c188
to
4f88b4e
Compare
andy-hanson
force-pushed
the
no_interface_constructor
branch
from
January 2, 2017 02:28
4f88b4e
to
e51b9c5
Compare
dphilipson
reviewed
Jan 2, 2017
must not have parentheses if removing them is allowed by TypeScript. | ||
options: | ||
type: string | ||
enum: | ||
- ban-single-arg-parens | ||
optionExamples: | ||
- 'true' | ||
- '[true, "ban-single-arg-parens"]' | ||
- '[true, "ban-single-arg-parens]"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adidahiya
reviewed
Jan 3, 2017
@@ -0,0 +1,5 @@ | |||
{ | |||
"rules": { | |||
"misused-new": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's call this no-misused-new
to adhere better to existing naming conventions (we usually prefix "no-" to rules that lint against the existence of some code)
andy-hanson
force-pushed
the
no_interface_constructor
branch
from
January 5, 2017 01:54
e51b9c5
to
5af075f
Compare
@andy-hanson thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
What changes did you make?
Added the
misused-new
rule, which warns on attempts to define constructable interfaces and to usenew
in classes. This has come up a few times on DefinitelyTyped.