-
-
Notifications
You must be signed in to change notification settings - Fork 75
Linting JSX const without brackets / parenthesis causes eslint to hang #227
Comments
I was unable to reproduce the problem with the code sample. Can you post your .eslintrc file maybe there is some rule causing the problem. Are you using eslint-plugin-react? I noticed a problem when enabling the jsx-indent rule from that plugin that would cause an infinite loop. |
I'll get the eslintrc for you tomorrow. We are running eslint-react as a result of using eslint-airbnb-config. I wonder if it's the I'm also running on a PC with very limited resources, which seems to exacerbate any inefficiencies. |
Sorry for the delay. My .eslintrc file is...
|
Thanks for posting the config. Can you try to disable |
That does fix the issue. I updated those values to
And I now see the linter execute correctly. |
I will try and take look at why this happens on the weekend. We are also working on implementing JSX indentation support to eslint v4 and I don't think I have seen this problem yet using that rule. |
Sorry I took so long to look into this. Just got caught up with other issues. We were not using the correct range or line/column numbers in the JSXText tokens. This is what was causing the infinite loops and possibly other failures with the |
What version of TypeScript are you using?
2.2.1
What version of
typescript-eslint-parser
are you using?2.1.0
What code were you trying to parse?
What did you expect to happen?
eslint to run successfully
What happened?
eslint hangs and becomes unresponsive. I've left it to run over lunch and it was still stuck.
Changing the syntax to be contained within brackets / parenthesis fixes the issue.
I've now been able to reproduce this several times.
The text was updated successfully, but these errors were encountered: