Skip to content

v1.0.0

Choose a tag to compare

@jboix jboix released this 01 Dec 19:06
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.
018e473

First release of @vibator/rules: shared rules for vibator, so a project loads them instead of copying them into .vibator/.

Install

npm install --save-dev vibator @vibator/rules
{
  "plugins": [
    "@vibator/rules/markdown",
    "@vibator/rules/text",
    "@vibator/rules/tsdoc"
  ]
}

Domains

Each domain is a plugin. A project loads only the ones it uses.

Plugin Rules Needs
@vibator/rules/markdown markdown-accessible, markdown-formatted (with fix) The remark plugins of the project's remark config
@vibator/rules/browser pages-accessible playwright, axe-core, and Playwright's Chromium
@vibator/rules/tsdoc tsdoc-coverage typescript 5.4 or later, below 7
@vibator/rules/text no-conflict-markers, no-em-dashes Nothing

Rules

  • markdown-accessible: Markdown images have alt text, headings keep their order, and links say where they go.
  • markdown-formatted: Markdown files match the remark format of the project. npx vibator --write formats them.
  • pages-accessible: the built pages pass axe-core for WCAG 2.2 A and AA, in light and dark, at desktop and phone width.
  • tsdoc-coverage: every function carries a TSDoc block, with @param and @returns.
  • no-conflict-markers: no file keeps a marker from an unfinished merge.
  • no-em-dashes: no em-dashes in documentation, comments, or user-facing strings.

Every rule takes a files option, honors vibator-ignore markers, and ships a guideline that npx vibator explain <rule> prints.

Namespaces

  • vibator.markdown: read and format Markdown with remark, configured by the project's .remarkrc.mjs and .remarkignore.
  • vibator.browser: serve a built folder to Chromium and run axe-core on its pages.

Requirements

  • vibator 3.
  • Node 24 or later, or Bun 1.4.2 or later.

The README covers configuration. The reference of each domain is in docs/design.