-
Notifications
You must be signed in to change notification settings - Fork 63
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
Plugin does not work with autofix #58
Comments
Plugins that use processors (that is, plugins which need to extract JavaScript snippets out of non-JavaScript files) are not able to use autofix due to architectural/design limitations we haven't yet been able to overcome. So files linted using eslint-plugin-markdown won't have autofix applied to them. As you've noted, this is a core ESLint issue and not something restricted to editor integrations. When I'm on a PC, I'll find the relevant issues and put them in here. |
@platinumazure Has anything changed to make this easier to add since the release of ESLint v4? |
No. However, this might be possible soon if eslint/eslint#9090 is merged. |
This got merged, so +1 |
It would be very nice if this could be worked on now. |
Guys, I created PR #97 for this feature. Feel free to share the feedback if it works for your use cases. |
* enable autofix * add processor test cases * add plugin test cases, add initCLI() helper function * Additional autofix tests * wip: cover edge cases * add(test): with multiple rules * fix: inside a list test pass * remove debugger * bump parser * add readme note * Autofix works with indents * Un-flatten offset map to a list of records * remove note about usage inside lists * make autofix example more explicit
Seems like it works through terminal, but does not writes the fixes? Also, it does not work in a editor, does we need some option for the Seems like adding to {
"language": "markdown",
"autoFix": true
} Some may have Prettier extension for VSCode too, but still it doesn't do all needed things. So, for me currently, this problem above isn't so much of a big deal. |
ref: AtomLinter/linter-eslint#815
Everything just started with AtomLinter/linter-eslint#779.
I just have a markdown file, javascript file and eslintrc.
I'm using:
and have this config
Intentionally makes
standard
to always want semicolons so it is easy to see if autofixing works.Initially I was thinking it is Linter-ESLint bug, but seems it isn't. Because when run the following ESLint still report errors and does not fix them.
the code fences in the markdown file is both
jsx
andjs
The text was updated successfully, but these errors were encountered: