-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend from tslint:latest #19309
Extend from tslint:latest #19309
Conversation
bf3b88b
to
f1771bb
Compare
f1771bb
to
525a528
Compare
tslint.json
Outdated
"variable-name": false, | ||
|
||
// https://github.com/Microsoft/TypeScript/issues/18340 | ||
"align": false, |
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.
these seem to be too pedantic and not much value..
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 should be fixed by a formatter instead of by a human.
tslint.json
Outdated
// TODO | ||
"arrow-parens": false, // [true, "ban-single-arg-parens"] | ||
"arrow-return-shorthand": false, | ||
"ban-types": false, |
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.
do not think we will do that one.
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 would prevent us from typing a function as Function
, which is unsafe. It also seems to fail on every reference to Symbol
since we shadow that, but could be configured to ignore that one.
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.
Wasn't too hard to fix. #19586
tslint.json
Outdated
"arrow-parens": false, // [true, "ban-single-arg-parens"] | ||
"arrow-return-shorthand": false, | ||
"ban-types": false, | ||
"callable-types": false, |
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.
why have this rule at all?
tslint.json
Outdated
"ban-types": false, | ||
"callable-types": false, | ||
"forin": false, | ||
"interface-name": false, // [true, "never-prefix"], |
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 is going to be hard in the LS, unless we are willing to break some APIs
tslint.json
Outdated
"forin": false, | ||
"interface-name": false, // [true, "never-prefix"], | ||
"member-access": false, // [true, "no-public"] | ||
"no-angle-bracket-type-assertion": false, |
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.
I like these... :(
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.
There is a lint rule mandating that only that kind of type assertion may be used, should we use that instead?
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.
No; I'm of the opinion that we should only use as
casts since they're the only style that works in all language variants ;)
Also angle brackets are sharp and pointy.
tslint.json
Outdated
"no-unnecessary-initializer": false, | ||
"no-var-requires": false, | ||
"object-literal-key-quotes": false, | ||
"one-variable-per-declaration": false, |
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.
seems overly restrictive
aeb3a81
to
73aa04f
Compare
73aa04f
to
79b9156
Compare
We've been ignoring the majority of lint rules and it looks like they'll unearth a lot of bad code. I'm leaving them as TODOs for now but this would get us started down the path of following tslint's recommendations.