-
-
Notifications
You must be signed in to change notification settings - Fork 79
Parser should ignore lines with hashbangs #161
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
Comments
I don't think it makes sense to use hashbangs in vue files. |
It doesn't and I'd actually like to restrict the parser to just |
Please provide a minimal repository to reproduce the problem. |
I already worked around the issue: overrides:
- files: ["**/*.vue"]
parser: vue-eslint-parser Arguably, this is how |
If you want to reproduce:
This will reproduce until go-gitea/gitea#20113 is merged. |
Your problem is with |
You seem to be aware of it already. |
Yeah, import-js/eslint-plugin-import#2431 will fix it in |
Parsing a file with hashbang/shebang (
#!
in the first line) likeresults in a parser error with this parser:
eslint's own parser handles this by ignoring files starting with hashbang:
https://github.com/eslint/eslint/blob/b93af98b3c417225a027cabc964c38e779adb945/lib/linter/linter.js#L779
Also, FWIW, there is a stage 3 ECMAScript proposal to make hashbangs part of the language.
The text was updated successfully, but these errors were encountered: