Skip to content

chore: add oxlint and oxfmt, fix findings, format the repo - #81

Merged
rachfop merged 3 commits into
mainfrom
chore/oxc
Oct 2, 2026
Merged

rachfop merged 3 commits into
mainfrom
chore/oxc

Conversation

@rachfop

@rachfop rachfop commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds the Oxc linter and formatter, fixes everything the linter reports, formats the repo, and gates CI on both. Three commits, kept separate so the mechanical reformat can be skipped in git blame:

  1. chore: add oxlint and fix its findings: oxlint 1.86.0 and oxfmt 0.71.0, pinned, with npm run lint (fails on warnings), lint:fix, format, and format:check. Fixes for the 110 default-rule findings:
    • examples/docusaurus.config.js didn't parse: the glob '**/drafts/**' in the commented-out options block contains */, which ended the block comment early. The block now uses line comments.
    • Unused imports, variables, parameters, and catch bindings; stub cleanup() functions with commented-out bodies; an unused mock; never-read passed counters in test-input-validation.js; unreachable fallback returns; the empty src/declarations.d.ts.
  2. style: format the repo with oxfmt: mechanical. singleQuote: true keeps the repo's existing quote style; test-docs/ fixtures are excluded. Markdown changes are blank lines after headings, aligned tables, and quote style inside code fences; prose is untouched.
  3. ci: gate PRs on oxlint and oxfmt: lint and format checks in the CI test job, plus .git-blame-ignore-revs listing commit 2.

Merge with a merge commit (not squash or rebase), so the SHA in .git-blame-ignore-revs stays valid.

Testing

  • npm test, npm run lint, and npm run format:check pass.
  • The docs site builds with the strict link checks.

rachfop and others added 3 commits October 2, 2026 13:47
Add oxlint (pinned, with `npm run lint` failing on warnings) and fix
everything it reports with the default rules:

- examples/docusaurus.config.js didn't parse: the glob '**/drafts/**'
  inside the commented-out options block contains `*/`, which ended the
  block comment early. The block now uses line comments.
- Remove unused imports, variables, parameters, catch bindings, and
  dead helpers (stub cleanup() functions with commented-out bodies, an
  unused mock, never-read `passed` counters in test-input-validation.js).
- Drop unreachable fallback returns after try/catch blocks that always
  return, and replace `new Array(n).fill()` with `Array(n).fill()`.
- Delete src/declarations.d.ts, which has been empty since the first
  commit.

Also add oxfmt (pinned) with `format` and `format:check` scripts and a
config that keeps the repo's single quotes and skips the test-docs
fixtures; the formatting pass lands in its own commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mechanical: `npm run format` with the config from the previous commit.
No behavior change; `npm test`, `npm run lint`, and the docs site build
pass before and after.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run `npm run lint` and `npm run format:check` in the CI test job, and
list the formatting commit in .git-blame-ignore-revs so `git blame`
(and GitHub's blame view) skips it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rachfop
rachfop merged commit 448e181 into main Oct 2, 2026
5 checks passed
@rachfop
rachfop deleted the chore/oxc branch October 2, 2026 20:51
rachfop added a commit that referenced this pull request Oct 2, 2026
chore: add oxlint and oxfmt, fix findings, format the repo
rachfop added a commit that referenced this pull request Oct 2, 2026
chore: add oxlint and oxfmt, fix findings, format the repo
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