- Create a new repository in GitLab for the OAD ruleset – proposed name: wikimedia-spectral-ruleset (after Spectral documentation and eslint-config-wikimedia)
- Set up the repository:
- Set up the ruleset
- Set up tests with Spectral, but without output to the npm library
- Prepare the repository for an npm library (README, versioning in git, etc.)
- Include the OAD example in the new repository as a standalone test
- Make sure tests are run through GitLab CI
Description
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | KBach | T422476 [Hypothesis] 5.2.5b: Productionalize API spec linting | |||
| Open | None | T422918 [5.2.5b Epic] Prepare the linter for use in CI | |||
| Resolved | Mooeypoo | T425625 Move linter rules to a separate repository |
Event Timeline
Comment Actions
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.
Comment Actions
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.