Open
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
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:
- MDX files need additional plugins to enhance the parser
- GitHub issue templates may not use newlines inside paragraphs
- Email templates might not need a level 1 heading
Solution
ESLint has pretty much the exact problem. They solved it using overrides
The same could be done for unified-engine
. For example:
plugins:
- remark-gfm
- [remark-lint-first-heading-level, 1]
overrides:
- files: ['*.mdx']
plugins:
- remark-mdx
- files: [.github/]
plugins:
- [remark-lint-first-heading-level, false]
ESLint also uses the globs to determine additional file extensions to check.
Alternatives
I can’t really think of anything else