-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement overrides similar to ESLint #56
Comments
|
I don’t know. Perhaps we should have a look at how ESLint handles it.
I think const retextPlugins = [
[someRetextPlugin]
]
export default {
plugins: [
['remark-retext', unified().use(retextPlugins)]
],
overrides: [
files: ['*.mdx'],
plugins: [
['remark-retext', unified().use([...retextPlugins, anotherRetextPlugin])]
],
]
} |
I think this point won’t need any special handling. It’ll just work.
I’m not so sure. One even bigger problem I didn’t think of: config files are also presets. 😬 Config files and presets can be loaded from say |
Initial checklist
Problem
Sometimes certain checks depend on context, not just language.
For example, typically markdown documents need to contain complete and valid markdown documents. Some specific documents may need some specific checks to be included or excluded though. For example:
Solution
ESLint has pretty much the exact problem. They solved it using
overrides
The same could be done for
unified-engine
. For example:ESLint also uses the globs to determine additional file extensions to check.
Alternatives
I can’t really think of anything else
The text was updated successfully, but these errors were encountered: