Skip to content

Apply more TSLint rules #3994

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

Closed
11 tasks
DanielRosenwasser opened this issue Jul 23, 2015 · 9 comments
Closed
11 tasks

Apply more TSLint rules #3994

DanielRosenwasser opened this issue Jul 23, 2015 · 9 comments
Labels
Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

Including

Any other suggestions?

@weswigham
Copy link
Member

We also need a rule to capture having else and catch statements on the line after the closing curly of the previous statement. Open issue on tslint requesting a rule for it.

@RyanCavanaugh
Copy link
Member

Do we have one for spaces between if and ( ?

@weswigham
Copy link
Member

We also need one for the space after a method declaration but before the method body, ie disallowing:

class A {
    func(){

    }
}

and

class A {
    func(): void{

    }
}

@weswigham
Copy link
Member

Also a rule for enforcing inferred typing on primitive literal declarations, ie

const member: string = "item"

should be

const member = "item"

@weswigham
Copy link
Member

The rule added that will be added from this PR should also be enabled to disallow the module keyword for internal modules.

@weswigham
Copy link
Member

@RyanCavanaugh "whitespace": [true, "check-branch"] should be covering that.

@weswigham
Copy link
Member

From this PR:

Use named parameter

A rule to forbid boolean parameters who aren't named.

@weswigham
Copy link
Member

...also a no trailing whitespace rule.

@danquirk
Copy link
Member

I tried to apply the no trailing whitespace rule locally but too many people are using editors where newline causes a smart indent that inserts whitespace. So then tslint flags tons of seemingly blank newlines as having trailing whitespace (because they're not simply a \n or \r\n). Would be nice to have on though.

weswigham added a commit to weswigham/TypeScript that referenced this issue Aug 26, 2015
weswigham added a commit that referenced this issue Sep 18, 2015
@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
Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants