Page MenuHomePhabricator

Move linter rules to a separate repository
Closed, ResolvedPublic3 Estimated Story Points

Description

Event Timeline

KBach triaged this task as High priority.
KBach added subscribers: Mooeypoo, HCoplin-WMF.
HCoplin-WMF set the point value for this task to 3.May 7 2026, 2:13 PM

Notes from estimation:

  • If we are continuing to work on rules, ensure everything we are still migrating/copying everything.
  • Should be fairly straight forward of copy/pasting, and writing the readme.
  • Norms follow Spectral documentation; naming pattern references other standards within the Foundation.

New repository at https://gitlab.wikimedia.org/repos/ci-tools/wikimedia-spectral-ruleset

Implemented end-to-end packaging and release hardening so it is ready to be consumable as a proper npm package and stable in CI.

NPM package preparation

  • Scoped package name set to @wikimedia/wikimedia-spectral-ruleset (as per norms and ownership requirements).
  • Added a real package entrypoint and exports so external Spectral users can extend the ruleset directly.
  • Added build pipeline to compile rules and custom functions into distributable output.
  • Ensured runtime Spectral dependencies are in dependencies (not only devDependencies).
  • Configured published file set so consumers receive only required artifacts.

Documentation

  • Rewrote README to be npm-consumer focused.
  • Added DEVELOPERS.md for developer-focused instructions.

Changelog automation

  • Added CHANGELOG.md with marker-based Unreleased section.
  • Added changelog commands:
    • npm run changelog
    • npm run changelog:update
  • Added updater script to refresh only the marker-bounded Unreleased block.

CI/CD hardening

  • Replaced starter GitLab CI template with staged pipeline:
    • validate
    • test (Node 20 + Node 22)
    • build
    • package dry-run + tarball artifact
    • consumer smoke test (install tarball + spectral lint)
  • Added local CI:
    • full pipeline runner: npm run ci:local.
    • quick mode for faster iteration: npm run ci:local:quick.

Marking as resolved as part of sprint close out.