Ignore TypeScript type aliases in space-infix-ops #10922
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
rule
Relates to ESLint's core rules
What rule do you want to change?
space-infix-ops
Does this change cause the rule to produce more or fewer warnings?
No change for javascript, no more false positives for typescript.
How will the change be implemented? (New option, new default behavior, etc.)?
Disable the rule for
VariableDeclarator
s where the parent node is aVariableDeclaration
with a non-standardkind
(notvar
,let
, orconst
). After this,eslint-plugin-typescript
can implement the rule for typescript type aliases (which are represented as variable declarations, withkind: 'type'
).Please provide some example code that this change will affect:
What does the rule currently do for this code?
It reports a violation, as after
Foo
the<
is not surrounded by whitespaces.What will the rule do after it's changed?
It'll ignore typescript type aliases, so a plugin can handle the non-standard syntax.
The text was updated successfully, but these errors were encountered: