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
Infix operators must be spaced for flow #7162
Comments
I can reproduce this. My guess is that the |
Reduced test case: Config: {
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"space-infix-ops": 2
},
"parser": "babel-eslint"
} Code: const foo = <T: StyleDeclaration>(foo): bar<T> => 5 I don't know very much about JSX, but it seems like the syntax is invalid when |
The default parser doesn't understand flowtype annotations, so it looks like it throws a parsing error because it thinks that code snippet is malformed JSX. As for |
Yeah, we can't really address this until #7129 is done. Then it should be easy (I think). |
Is this still an issue in 4.0.0-alpha now that #7129 has been fixed? |
Closing because there was no response. |
Tell us about your environment
v3.5.0
v6.5.0
3.10.3
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
Not get a linting error right after
export const makeThemedStyleSheet = <T: StyleDeclarate>
What actually happened? Please include the actual, raw output from ESLint.
40:3 error Infix operators must be spaced space-infix-ops
The text was updated successfully, but these errors were encountered: