Skip to content
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

Merged
merged 6 commits into from Sep 18, 2015
Merged

Conversation

weswigham
Copy link
Member

@weswigham
Copy link
Member Author

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?)

@jkillian
Copy link

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

@weswigham
Copy link
Member Author

I'd probably say to go for it - which ones are you interested in?

@adidahiya
Copy link
Contributor

I'm mainly interested in bringing no-inferrable-types into the core rules.

There seems to be interest in something like next-line as well, but we already have a thread going for that: palantir/tslint#88

@jkillian
Copy link

I thought maybe no-null as well? Seems like something people might want

@adidahiya
Copy link
Contributor

I'd like to wait until we see more demand for a no-null-keyword rule -- mainly because I'd like to create another contradictory rule that forbids implicit type casts for null checks (and encourages == null): palantir/tslint#625

}
break;
case ts.SyntaxKind.StringKeyword:
if (e.initializer.kind === ts.SyntaxKind.StringLiteral || e.initializer.kind === ts.SyntaxKind.NoSubstitutionTemplateLiteral) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider TemplateExpression as well

@weswigham
Copy link
Member Author

@DanielRosenwasser feedback integrated.

@DanielRosenwasser
Copy link
Member

👍

@weswigham
Copy link
Member Author

@mhegazy would you like to 👍 this?

@mhegazy
Copy link
Contributor

mhegazy commented Sep 17, 2015

👍

weswigham added a commit that referenced this pull request Sep 18, 2015
@weswigham weswigham merged commit e813963 into microsoft:master Sep 18, 2015
@jkillian
Copy link

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

@weswigham weswigham deleted the tslint-rules branch August 17, 2017 23:03
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants