cloudflare/oxlint-config
Developer ToolsShared Oxlint preset adding type-safety and promise-handling rules for Cloudflare JavaScript and TypeScript projects.
This project ships 1 agent skillsSkill list and install →What it is
@cloudflare/oxlint-config is a shareable Oxlint preset for JavaScript and TypeScript projects. It extends @nkzw/oxlint-config with additional rules for type safety, promise handling, and type-only imports, and is published as an npm package (Apache-2.0). It suits teams that already lint with Oxlint and want a shared, opinionated rule baseline.
Quick start
Requirements: Node.js 22.18+ (the first 22.x release that loads oxlint.config.ts without extra flags) and Oxlint 1.94+, plus tsrs, the type-aware backend.
-
Install the preset and its peers:
npm install -D @cloudflare/oxlint-config oxlint@^1.94.0 tsrs@^7.1.0-beta.tsrs2 -
Create
oxlint.config.tsin the project root and spread the preset:import cloudflare from '@cloudflare/oxlint-config'; import { defineConfig } from 'oxlint'; export default defineConfig({ ...cloudflare }); -
Add project settings after the spread. To add rules, spread
cloudflare.rulesorcloudflare.overridesrather than replacing them. -
Run
oxlint .locally and in CI. Oxlint does not report TypeScript compiler errors by default, so keep your type-check command in CI or setoptions.typeCheck: true.
Rule behavior
Enabled rules are treated as errors, and Oxlint's category defaults are off so upgrades cannot silently enable rules. Notable choices: eqeqeq applies to null checks; typescript/no-misused-promises reports promise-returning callbacks where void is expected; empty interfaces, @ts-ignore, eval, and self-imports are errors; @ts-expect-error requires a description. TypeScript uses typescript/only-throw-error, while JavaScript keeps no-throw-literal and disables the five typescript/no-unsafe-* rules. Test files disable several strict rules, and no-console applies everywhere, including entry points that the base preset exempts—add a file override where logging is expected.
Migrating an existing project
Adopt the preset in one passing commit with newly failing rules temporarily off, then enable each rule in its own commit with fixes or a documented reason to stay off, and squash the migration into one pull request. A migration skill gives coding agents the full workflow; it ships in the npm package at the same path.
Development
Install Vite+, use Node.js 24 LTS (24.11+) as CI does, then run vp install, vp check, and vp test. vp pm pack builds a tarball for testing in a consumer project. Report vulnerabilities through the security policy.
HotRepo's take
The repository appeared on HotRepo's new-project list for the JavaScript language on 2026-11-22, gaining 3 stars in a growth window of about one hour around 19:46–20:46 UTC, reaching 105 total stars and 5 forks. The record is a single-hour new-list snapshot rather than a sustained trend, so it shows early interest from a small set of teams rather than broad adoption. What is verifiable is the packaging itself: a thin, Cloudflare-specific layer over an existing preset, delivered with a migration skill and a CI-checked npm Trusted Publishing flow.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- voidzero-dev/vite-plusBundles Vite, Vitest, Oxlint, Oxfmt, Rolldown and task caching into one CLI so web projects use a single toolchain and config.
- microsoft/TypeScriptAdds optional types to JavaScript so large codebases can be refactored and checked before they run.
- cloudflare/workerdAn open-source JavaScript/Wasm server runtime for self-hosting Cloudflare Workers-style applications, local development, and programmable HTTP proxying.
- denoland/denoA secure JavaScript, TypeScript and WebAssembly runtime for building and running applications, especially web servers.
- axios/axiosPromise-based HTTP client for browsers and Node.js, used for sending requests and handling responses with interceptors, cancellation and progress support.