You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My motivation for this rule is to enforce consistent spacing for type unions in type parameter, specifically to always have spaces surrounding the |. E.g. string | number, not string|number nor string |number nor string| number. (Obviously, alternative spacing preferences should also be supported).
Current behavior
As far as I can tell this is currently not supported at all.
I also believe this is not within the scope of:
NOTE 2: If this is a feature specifically related to the parsing of types, e.g.,
supporting some-new+type-syntax (within curly brackets) in:
but please let me know if it is and I'll file an issue there
Desired behavior
A new rule to lint for spacing (or formatting more broadly) of type parameters.
I don't believe this would fit in with any of the existing rules, hence I'm suggesting a new rule. Other than that I don't have any strong opinions on it being a new rule.
Alternatives considered
I considered looking up a separate/alternative ESLint plugin for this, but I feel like this plugin is well suited for this.
The text was updated successfully, but these errors were encountered:
Motivation
My motivation for this rule is to enforce consistent spacing for type unions in type parameter, specifically to always have spaces surrounding the
|
. E.g.string | number
, notstring|number
norstring |number
norstring| number
. (Obviously, alternative spacing preferences should also be supported).Current behavior
As far as I can tell this is currently not supported at all.
I also believe this is not within the scope of:
but please let me know if it is and I'll file an issue there
Desired behavior
A new rule to lint for spacing (or formatting more broadly) of type parameters.
I don't believe this would fit in with any of the existing rules, hence I'm suggesting a new rule. Other than that I don't have any strong opinions on it being a new rule.
Alternatives considered
I considered looking up a separate/alternative ESLint plugin for this, but I feel like this plugin is well suited for this.
The text was updated successfully, but these errors were encountered: