Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Add "check-type-operator" option for whitespace rule #488

Closed
adidahiya opened this issue Jul 3, 2015 · 1 comment
Closed

Add "check-type-operator" option for whitespace rule #488

adidahiya opened this issue Jul 3, 2015 · 1 comment

Comments

@adidahiya
Copy link
Contributor

I'd like to lint for whitespace around type operators like | and &.

Test Cases

passing:

type StringOrNumber = string | number;

interface IFoo {
    someProp: string | number;
}

function foo(x: string | number) {
    //
}

failures:

type StringOrNumber = string|number;

interface IFoo {
    someProp: string|number;
}

function foo(x: string|number) {
    //
}

relevant: TS repo has a custom rule for this already; we can just copy the implementation: microsoft/TypeScript#5366

@adidahiya adidahiya changed the title [New Rule] Add "check-union" option for whitespace rule Add "check-union" option for whitespace rule Jul 15, 2015
@adidahiya adidahiya changed the title Add "check-union" option for whitespace rule Add "check-type-operator" option for whitespace rule Dec 1, 2015
@ajafff
Copy link
Contributor

ajafff commented Aug 14, 2017

Fixed by #3083

@ajafff ajafff closed this as completed Aug 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants