Skip to content

chore(lint): adopt node-lint (biome + markdownlint) - #9

Merged
nabheet merged 1 commit into
mainfrom
chore/lint-6
Oct 31, 2026
Merged

nabheet merged 1 commit into
mainfrom
chore/lint-6

Conversation

@nabheet

@nabheet nabheet commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Closes nabheet/galactic-config#6.

Problem

lint was markdownlint-cli2 "**/*.md" and there was no biome.json, so the JS was never linted or formatted and the repo did not meet the node-lint skill. §12 said CI files come from the reference repo but never said the reference is not a lint reference, so copying it inherited the gap.

Change

  • biome.json and .markdownlint-cli2.jsonc copied with cp from the skill's references/. MD013 moves 120 → 100 to match biome's lineWidth; biome migrate --write fixed the schema URL to the installed CLI.
  • lint / lint:fix run biome then markdownlint (skill's scripts verbatim). check stays lint && test — plain-JS repo, no typecheck step.
  • @biomejs/biome added as a devDependency and to the release guard's inert list: a linter is not in files, so neither it nor its bumps can change what a consumer installs.
  • Biome's findings fixed: a trailing comma in index.js, import order in test/rewrite.test.mjs, and a missing semicolon in the README hook sample (a code block, so biome does not reach it — changed for consistency).
  • .nvmrc pins 24 to match CI, and README Requirements notes the dev tooling needs Node ≥ 22 (markdownlint-cli2 does) while the plugin runs on 18+.

Docs (separate repo, galactic-config 0b69056)

  • §12: authority table — CI shape from the standard + class reference, lint config from the skill — with rtk as the worked example, and the stale "no repo has adopted yet" notes for §8/§14 removed.
  • node-lint SKILL.md §5: the same split from the skill side.

Verification (run locally)

./node_modules/.bin/biome check .                         # Checked 8 files, no fixes applied
./node_modules/.bin/markdownlint-cli2 "**/*.md" ...       # 0 issues
node --check index.js && node --test test/*.test.mjs      # 7 pass, 0 fail
actionlint -shellcheck= .github/workflows/ci.yml          # clean

CI's test job runs npm run lint before npm test, and both publish and prerelease depend on it, so a lint failure blocks a release.

This publishes a patch on merge. It touches index.js and README.md, which are published files; the guard reports changed=true and is right to. The lint wiring alone (configs, scripts, .github) would have been non-shipping.

Closes galactic-config#6. The repo had a markdownlint-only `lint` script and no
`biome.json`, so it did not meet the `node-lint` skill and the JS was never
linted or formatted.

- Copy `biome.json` and `.markdownlint-cli2.jsonc` from the skill's
  `references/` (MD013 drops 120 -> 100 to match biome's lineWidth).
- `lint` / `lint:fix` run biome then markdownlint, matching the skill's scripts.
  `check` is unchanged (lint + test) — no typecheck step on a plain-JS repo.
- Add `@biomejs/biome` as a devDependency and to the release guard's inert list:
  it is a linter, it is not in `files`, so neither it nor its bumps can change
  what a consumer installs.
- Fixes biome reported: a trailing comma in index.js, organised imports in the
  test file, and a missing semicolon in the README hook sample (a code block, so
  biome does not reach it — changed for consistency with the formatter).
  No behaviour change; the 7 existing tests still pass.
- `.nvmrc` pins 24 (CI's version) and README Requirements notes that the dev
  tooling needs Node >= 22 while the plugin itself runs on 18+.

CI already ran `npm run lint`, so the workflow only needed the inert-list entry.

This changes published files (index.js, README.md), so the guard publishes a
patch on merge — correct, and not what the lint wiring alone would have done.
@nabheet
nabheet marked this pull request as ready for review October 31, 2026 22:39
@nabheet
nabheet merged commit 80f6d2f into main Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant