Context
Prettier is already configured in this repo (.prettierrc, format script, lint-staged block) but never enforced — there's no .husky/prepare script wiring it to git hooks, and CI's docs-lint-all step only lints .js/.ts/.jsx/.tsx (ESLint) and .css (Stylelint); eslint.config.mjs explicitly ignores .md/.mdx/.json. So doc content has zero formatting enforcement today.
Separately, lint.yml's docs-lint-markdown step is currently a no-op: it defaults to checking docs/**/*.md, but docs/ has 294 .mdx files and zero .md files, so it never matches anything and silently passes without checking content.
Proposal
- Add a Prettier CI check scoped to changed files only (see
metamask-docs's ci.yml prettier job for the pattern).
- Wire up
.husky + prepare so lint-staged actually runs pre-commit locally.
- Remove the
docs-lint-markdown step from lint.yml.
- Review and update
.prettierrc for docs before turning any of this on — proseWrap and printWidth in particular will almost certainly need to change from their current defaults (always / 80) to match how Linea docs are actually written, or the first run will force a massive rewrap diff across nearly every page.
Notes
- Needs its own investigation into the right Prettier config for this content (proseWrap, printWidth, frontmatter quote style, MDX-specific quirks) — don't assume current
.prettierrc values are right for docs.
- Decide file-type scope for the new CI check (at minimum
.md/.mdx; avoid re-checking .js/.ts/.jsx/.tsx/.css, already covered by existing ESLint/Stylelint).
Context
Prettier is already configured in this repo (
.prettierrc,formatscript,lint-stagedblock) but never enforced — there's no.husky/preparescript wiring it to git hooks, and CI'sdocs-lint-allstep only lints.js/.ts/.jsx/.tsx(ESLint) and.css(Stylelint);eslint.config.mjsexplicitly ignores.md/.mdx/.json. So doc content has zero formatting enforcement today.Separately,
lint.yml'sdocs-lint-markdownstep is currently a no-op: it defaults to checkingdocs/**/*.md, butdocs/has 294.mdxfiles and zero.mdfiles, so it never matches anything and silently passes without checking content.Proposal
metamask-docs'sci.ymlprettierjob for the pattern)..husky+preparesolint-stagedactually runs pre-commit locally.docs-lint-markdownstep fromlint.yml..prettierrcfor docs before turning any of this on —proseWrapandprintWidthin particular will almost certainly need to change from their current defaults (always/80) to match how Linea docs are actually written, or the first run will force a massive rewrap diff across nearly every page.Notes
.prettierrcvalues are right for docs..md/.mdx; avoid re-checking.js/.ts/.jsx/.tsx/.css, already covered by existing ESLint/Stylelint).