Skip to content

chore: repo maintenance tooling (lint, format, pre-commit hooks, contributor docs) - #74

Merged
Wikid82 merged 3 commits into
developmentfrom
feature/maintenance-tooling
Aug 23, 2026
Merged

chore: repo maintenance tooling (lint, format, pre-commit hooks, contributor docs)#74
Wikid82 merged 3 commits into
developmentfrom
feature/maintenance-tooling

Conversation

@Wikid82

@Wikid82 Wikid82 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Bundles four small, non-user-facing maintenance issues into one PR since none of them touch extension behavior:

  • Add a real linter/formatter (ESLint + Prettier) beyond tsc --noEmit #54 — real linting: ESLint (flat config, typescript-eslint) + Prettier, split into lint:types/lint:style under the existing npm run lint, plus format/format:check wired into CI.
  • (mechanical) reformatted the existing codebase with Prettier as its own commit so format:check has a clean baseline, kept separate from the tooling commit for easier review/blame.
  • Add lefthook for local pre-commit checks #51lefthook pre-commit hook (lint, format, unit tests against staged files), installed automatically via postinstall.
  • Add a pull request template #52.github/PULL_REQUEST_TEMPLATE.md mirroring the Definition of Done.
  • Add CONTRIBUTING.md #53CONTRIBUTING.md capturing the branching model, commit conventions, and Definition of Done for human contributors (previously only in CLAUDE.md), linked from the README.

#56 (README screenshot/GIF) intentionally left out — several open enhancement issues (#42, #48, #50) will visibly change the sidebar, so a screenshot captured now would need to be redone soon.

Test plan

  • npm run lint (tsc + eslint)
  • npm run format:check
  • npm run test (155 tests passing)
  • npm run build
  • npx lefthook run pre-commit exercised live across all three commits

npm run lint was tsc --noEmit only — a type-check, not a lint — with no
formatter and nothing enforcing checks before a commit reached CI.

- ESLint (flat config, typescript-eslint) split into lint:types/lint:style
  under the existing lint script, so CI's Lint step is a drop-in.
- Prettier with a format/format:check script, wired into CI as a new step.
- lefthook, installed via postinstall, running lint/format/test against
  staged files on pre-commit.

Closes #54, #51.
Mechanical reformat only, no behavior change — establishes the baseline
that npm run format:check now enforces in CI.

Part of #54.
CLAUDE.md (an AI-assistant-facing file) was the only place the branching
model, commit conventions, and Definition of Done were written down, so
human contributors had no equivalent onboarding doc, and PRs had no
checklist prompting them through it.

- CONTRIBUTING.md summarizes the workflow and Definition of Done, linked
  from README's Development section.
- .github/PULL_REQUEST_TEMPLATE.md mirrors that checklist on every PR.
- CLAUDE.md/README updated to describe the lint:types/lint:style split,
  format:check, and the new lefthook pre-commit hook.

Closes #53, #52.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.50623% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
extension.ts 97.50% 0 Missing and 10 partials ⚠️

📢 Thoughts on this report? Let us know!

@Wikid82
Wikid82 merged commit 8f570fe into development Aug 23, 2026
7 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.

2 participants