Skip to content

Lint with oxlint and check formatting and types in CI - #15

Merged
moodysalem merged 3 commits into
mainfrom
ci/fast-checks
Oct 14, 2026
Merged

moodysalem merged 3 commits into
mainfrom
ci/fast-checks

Conversation

@moodysalem

Copy link
Copy Markdown
Member

Replaces ESLint with oxlint and puts formatting, lint and type checks in one CI job.

  • Lint: oxlint keeps the complexity cap of 10 and adds the type-aware rules from typescript-eslint's recommended-type-checked set (floating and misused promises, template and + operands, unnecessary type assertions and similar), excluding the no-unsafe-* family. Warnings and unused disable directives fail.
  • Coverage: oxlint also lints the scripts inside .astro files, which ESLint skipped. It finds two functions over the complexity cap there (repairAccessibility in src/pages/api/index.astro and one in PolicyEditor.astro). scripts/lint.ts records them in lint-suppressions.json: a new violation fails, and a fixed one must be pruned with bun run lint:prune. They will be fixed separately.
  • Format: bun run format:check (Prettier) now runs in CI. Two Markdown tables had drifted and are realigned in their own commit; rendered pages are unchanged. Generated benchmark JSON is ignored. Prettier stays because oxfmt cannot format .astro files.
  • Types: bun run check (astro check) now runs in CI. TypeScript 7 is not used because astro check needs the TypeScript 5 language service for .astro files.

Local timings: lint 0.4 s (ESLint) → 0.3 s (oxlint with type-aware rules), format check 1.1 s, astro check 5 s.

Replace ESLint with oxlint. The complexity cap of 10 carries over unchanged,
and type-aware rules from typescript-eslint's recommended-type-checked set now
run as well (floating and misused promises, template and plus operands,
unnecessary type assertions and similar), excluding the no-unsafe family.
Warnings and unused disable directives fail.

oxlint also lints the scripts in .astro files, which ESLint skipped, and finds
two functions over the complexity cap there. scripts/lint.ts records them per
file and rule in lint-suppressions.json: a new violation fails, and a fixed one
must be pruned with bun run lint:prune.
Only table alignment changes; rendered pages are identical. Benchmark JSON
files are written by Foundry and the measurement scripts, so Prettier leaves
them as generated.
The Checks job runs Prettier, the oxlint ratchet and astro check, each
reporting even when an earlier step fails. Formatting and types were not
checked in CI before. Prettier stays because oxfmt does not format .astro
files.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ekubo-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a0c8d6a
Status: ✅  Deploy successful!
Preview URL: https://6164c03d.ekubo-docs-966.pages.dev
Branch Preview URL: https://ci-fast-checks.ekubo-docs-966.pages.dev

View logs

@moodysalem
moodysalem merged commit 613d3d6 into main Oct 14, 2026
2 checks passed
@moodysalem
moodysalem deleted the ci/fast-checks branch October 14, 2026 20:04
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