Shareable Oxlint and Oxfmt configs for Vite+ apps and TypeScript libraries.
@qntx/oxlint— correctness and type safety (config,react,merge).@qntx/oxfmt— printer (fmt).printWidth: 100, double quotes, semicolons,sortImportson.
Compose in one vite.config.ts. Do not use Oxlint extends (it merges only rules / plugins / overrides and drops env / options / settings / ignorePatterns).
The sibling repo qntx/oxfmt is a Vite+ starter. @qntx/oxfmt lives here.
Requires oxlint 1.82.0. Vite+ 0.3.1 nests 1.81.0; this repo overrides that. Vite+ consumers who do not override still run 1.81.0 (1.82 added no new rule ids).
bun add -d @qntx/oxlint @qntx/oxfmtDo not add oxlint, oxfmt, or oxlint-tsgolint to a Vite+ app. vp already nests them.
import { defineConfig } from "vite-plus";
import { react } from "@qntx/oxlint";
import { fmt } from "@qntx/oxfmt";
export default defineConfig({
lint: react,
fmt,
});react already includes the core TypeScript/ESLint/Vitest table plus native react / jsx-a11y / react-perf.
import { defineConfig } from "vite-plus";
import { config } from "@qntx/oxlint";
import { fmt } from "@qntx/oxfmt";
export default defineConfig({
lint: config,
fmt,
});config does not enable React plugins.
import { defineConfig } from "vite-plus";
import { config, merge } from "@qntx/oxlint";
import { fmt } from "@qntx/oxfmt";
export default defineConfig({
lint: merge(config, { rules: { "eslint/no-console": "off" } }),
fmt: { ...fmt, printWidth: 120 },
});Drop default ignore patterns with { ignorePatterns: undefined }. Replace them with { ignorePatterns: [] } then set a new list. fmt is a flat object; spread is enough.
// oxlint.config.ts
export { config as default } from "@qntx/oxlint";
// oxfmt.config.ts
export { fmt as default } from "@qntx/oxfmt";Vite+ projects should put lint and format in vite.config.ts.
MIT © QuantX