Skip to content
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

Please document how to make the linter fixable #467

Open
4 tasks done
Zemnmez opened this issue Jul 14, 2023 · 3 comments
Open
4 tasks done

Please document how to make the linter fixable #467

Zemnmez opened this issue Jul 14, 2023 · 3 comments

Comments

@Zemnmez
Copy link

Zemnmez commented Jul 14, 2023

Initial checklist

Problem

The current readme.md says this:

possible fixable depends on your remark plugins:

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.

@JounQin
Copy link
Member

JounQin commented Jul 14, 2023

Can you provide a reproduction that eslint --fix doesn't work but remark-cli works?

@Zemnmez
Copy link
Author

Zemnmez commented Jul 14, 2023

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"?

@ChristianMurphy
Copy link
Member

@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 remarkjs/remark-lint#82
But some stylistic ones can be fixed by indirectly, through the remark/mdx stringifier options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants