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
Autofix breaks the code #10688
Comments
Would it be possible to provide the output of running ESLint without autofix, on the original version of the file? That way, we can see what rules were reporting lint errors (and therefore, what could potentially be trying to fix code and creating a parse error). Also: It might be that the rules in question are from a plugin; if that's the case, then it will be up to the rule authors in that plugin to fix their autofix logic. |
Here you go:
For the plugin I really don't know, so I thought if someone could help debug it, and found that it comes from a plugin, I would move the ticket to the plugin repo. |
Thanks, I appreciate your effort to make the test case as small as possible. In order to find out which rules are causing the problem, try disabling all but one rule (among the rules listed in the email report) and running ESLint with autofix. Hopefully only some of those will actually autofix to broken code. Depending on what you find, we can investigate any bugs with core rules or else help you create an issue in the right plugin repositories. Happy hunting! 😄 |
Might be the same issue as prettier/eslint-plugin-prettier#65. |
It looks like this is an issue with the Prettier plugin. As this is a question rather than an action item, I'm closing the issue. If you still need help, please send a message to our mailing list or chatroom. Thanks! |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Please take a look at https://framagit.org/nicofrand/break-eslint/blob/master/main.js.
I do not provide the code here since I think there might be something with the spaces or tabs in this file.
Please clone the project to reproduce: https://framagit.org/nicofrand/break-eslint/tree/master.
What did you expect to happen? The file to be fixed
What actually happened? Please include the actual, raw output from ESLint.
Here is eslint output:
Here is the output of the file, as you can see it is "broken" (several
<main>
, missing<Route
, etc.):The text was updated successfully, but these errors were encountered: