Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

space-infix-ops fails for mapped type declarations #449

Closed
nevir opened this issue Feb 22, 2018 · 4 comments
Closed

space-infix-ops fails for mapped type declarations #449

nevir opened this issue Feb 22, 2018 · 4 comments

Comments

@nevir
Copy link

nevir commented Feb 22, 2018

What version of TypeScript are you using?

2.7.1

What version of typescript-eslint-parser are you using?

14.0.0

What code were you trying to parse?

export type FieldArguments<TArgTypes = JsonScalar> = NestedObject<TArgTypes>;

What did you expect to happen?

No error with space-infix-ops: error

What happened?

Infix operators must be spaced

Repro

If you check out https://github.com/convoyinc/apollo-cache-hermes, and uncomment the space-infix-ops rule, it'll generate this error at a few locations

@JamesHenry
Copy link
Member

I think a custom rule may need to be created in the plugin to handle this. It would be fantastic if one of the people affected by this issue could contribute to it.

@zuzusik
Copy link

zuzusik commented Jul 8, 2018

@JamesHenry looks like it is issue of a parser - I did a quick search over the code and looks like the support of GenericTypeAnnotation which was added here https://github.com/eslint/typescript-eslint-parser/pull/53/files#diff-6ecca2b7675f672f87297d93eec1e4baR479 was dropped at some point

I assume the fix would be get back the support of GenericTypeAnnotation in this parser

@madbence
Copy link

@nevir @JamesHenry eslint/eslint#10935 was merged, so i think this can be closed. 🙆

@mysticatea
Copy link
Member

Thank you!

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

5 participants