Open Zemnmez opened 1 year ago
Can you provide a reproduction that eslint --fix
doesn't work but remark-cli
works?
I just tried using the config example that remark-lint uses and notices it fixes some things.
Maybe we could just amend the documentation to say "not all remark-lint rules have automatic fixers"?
@Zemnmez That is how I would interpret the existing comment in the documentation, but if you believe it can be worded for more clarity, feel free to open a PR.
remark-lint
rules by themselves do not have fixers https://github.com/remarkjs/remark-lint/issues/82
But some stylistic ones can be fixed by indirectly, through the remark/mdx stringifier options.
Initial checklist
Problem
The current readme.md says this:
But it doesn't elaborate on what needs to be done to make the lint fixable. For example, currently, applying this plugin for me removed all my markdown line-wraps.
I've made the line length an error, but it doesn't appear to expose a fixer. The remark lint documentation describes some steps to achieve this, but they involve instrumenting remark-cli, something the eslint-mdx docs do not cover.
Thanks!
Solution
Markdown files should be automatically fixed.
Alternatives
Use remark-cli directly.