-
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
Add tslint rules for #3994 #4458
Conversation
weswigham
commented
Aug 26, 2015
Ping @DanielRosenwasser for some input. (specifically on the inference rule - is it even possible to recover that kind of info from the checker right now?) |
These seem like good rule concepts, any interest in contributing some/all of these directly to TSLint? If not, we'll probably go ahead and add at least some of them ourselves |
I'd probably say to go for it - which ones are you interested in? |
I'm mainly interested in bringing There seems to be interest in something like |
I thought maybe no-null as well? Seems like something people might want |
I'd like to wait until we see more demand for a |
} | ||
break; | ||
case ts.SyntaxKind.StringKeyword: | ||
if (e.initializer.kind === ts.SyntaxKind.StringLiteral || e.initializer.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral) { |
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.
Consider TemplateExpression
as well
@DanielRosenwasser feedback integrated. |
👍 |
@mhegazy would you like to 👍 this? |
👍 |
Just fyi: we're working on adding this to tslint. I've added checking for parameter declarations as well as variable declarations. Feel free to leave feedback if you have any: palantir/tslint#690 |