Config Authoring
Bridge execution solves "how to run Remark from ESLint." Config authoring rules solve "how to keep Remark config files maintainable over time."
Why config quality rules matterโ
In larger repositories, Remark config drift usually appears as:
- duplicated
pluginsentries - inconsistent plugin array ordering
- hidden relative path assumptions
- plugin packages referenced by config but missing from package metadata
The config rule set keeps config files deterministic and review-friendly.
Recommended baselineโ
Start with recommended, then strengthen incrementally.
A practical progression:
- Shape rules such as
prefer-remark-plugins-array. - Deduplication and sorting rules for stable diffs.
- Package and path checks for monorepo safety.
Authoring conventions that scaleโ
1. Keep plugins explicitโ
- Avoid implicit path behavior.
- Prefer package-based references where possible.
- Enforce package-install checks with
require-remark-plugins-packages-installed.
2. Keep arrays deterministicโ
Use sorting rules to minimize merge churn:
3. Avoid local relative plugins by defaultโ
Local Remark plugins can be valid, but they are harder to package, share, and resolve consistently in monorepos.
Use disallow-remark-relative-plugin-paths unless local plugins are an explicit project policy.
Monorepo tipsโ
- Keep
configFileexplicit when packages need different Remark behavior. - Avoid relative plugin path assumptions between packages.
- Validate package dependencies where Remark config references plugins.
Migration strategy for existing reposโ
- Enable config rules in warning mode first.
- Apply autofixes and sorting.
- Resolve remaining hard violations in batches.
- Promote to error once baseline debt is cleared.
Related docsโ
- Runtime bridge behavior: Remark Bridge
- Initial setup: Getting Started
- Full policy sets: Preset Reference