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
React JSX E015 "Unclosed regular expression" #3097
Comments
JSHint is not capable of parsing JSX syntax, so I don't think the source code you have shared is the same as the code being supplied to JSHint. It's difficult to say this without further knowledge of your toolchain, though. If you could share the JavaScript code, then we should be able to help. |
Hi and thanks for the quick answer!! Here's a very simple react biolerplate that's presenting the same issue: import React, { Component } from 'react';
export default class App extends Component {
render() {
return (
<div>React simple boilerplate</div>
);
}
} Here's a picture of how it looks on VS Code. This is the complete file as you can see and the error is the same. Hopefully this info is helpful. Best, |
I can reproduce that behavior on JSHint.com, but the error you have reported is I'm not quite ready to close this issue, though, because your initial report
While this may be valid JSX syntax, it is not valid JavaScript, and I would |
I'll look into that and get back as soon as I have some info. Best, |
Any word on this, @rhernandog? |
@jugglinmike Sorry but there's no news regarding this. As you can see I mentioned in the extension's repo with no luck. In fact the extension hasn't been updated in almost a year and no issue has been answered since September, so I'm not very confident that we'll get an answer regarding this. The creator is most focused on the ESLint extension than the JSHint one, like Neo said to the architect: The problem is choice It's your choice to either keep this open or close it. If by any miracle there's an answer on the repo I'll get back and re-open it. Thanks for following up. Best, |
Without any further information, there's not much we can do here. I think my theory regarding erroneous plugin behavior is the most viable explanation, so I'd like to proceed based on that interpretation until we have reason to suspect otherwise. As you say, we can re-open this issue when/if that's appropriate. Thanks for getting back to me! |
I hope this answer helps. I was facing the same issue. Turns out it was caused by several third party extensions. |
hey @jugglinmike, I've worked on the VS Code extension using JSHint recently and can shed some light on it. It's directly passing the whole document as one string to the JSHINT javascript api, no transformation is done. The code
does show errors. I'm not sure what the original author's intention was with running it on .jsx files, but I guess the solution would be for the extension to parse the file and identify the jsx parts of syntax and make them blank lines before passing them to JSHint. |
I am facing the same issue... Not sure how to handle this |
Same issue here, or maybe its not even an issue... |
Disabling JSHint solved this issue for me. |
How to disable jshint? |
@JuanPabloSilva please check it. |
This error is so annoying that it makes jshint unusable. Is there an option to disable this hint at least? |
|
just disable the jshint, since it conflicts with other vscode packages. |
Thank you,I removed the jshint.Then everything is OK. |
I uninstall |
I nuked |
Hi,
I'm having some issues in specific parts of a React App with the error E015.
Here are some lines where the error is showing:
The errror shows in the bigger-than sign at the end
The errror shows in the bigger-than sign at the end of the h5 tag
The errror shows in the bigger-than sign at the end of the h4 tag
I have version 2.9.4 and using VS Code version 1.9. The resulting bundled code is working without any problem.
What draws my attention is that the error goes away when the code changes to this:
Hopefully someone could give me some pointers regarding this.
Best,
Rodrigo.
The text was updated successfully, but these errors were encountered: