Shared Oxlint configuration for Clipboard Health repositories.
npm install @clipboard-health/oxlint-config
Use the package's TypeScript helper when a repo needs additive composition. Oxlint's built-in extends is useful for simple inheritance, but it does not let a repo safely append shared plugins, overrides, and similar array fields without re-specifying the shared values.
Create an oxlint.config.ts in your repo root:
import { base, createOxlintConfig, vitest } from "@clipboard-health/oxlint-config";
import { defineConfig } from "oxlint";
export default defineConfig(
createOxlintConfig({
localConfig: {
categories: {
correctness: "error",
nursery: "error",
pedantic: "error",
perf: "error",
restriction: "error",
style: "error",
suspicious: "error",
},
ignorePatterns: [".agents", "coverage/", "node_modules/"],
options: {
denyWarnings: true,
reportUnusedDisableDirectives: "error",
typeAware: true,
typeCheck: true,
},
rules: {
"vitest/require-test-timeout": "off",
},
settings: {
node: {
version: ">=24.14.0",
},
},
},
presets: [base, vitest],
}),
);
Available presets:
basereactjestvitestMerge behavior:
plugins, jsPlugins, overrides, and ignorePatterns append in orderrules, settings, options, categories, env, and globals merge left-to-rightlocalConfig always wins over preset values when keys conflictCreate an .oxlintrc.json in your repo root:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": ["./node_modules/@clipboard-health/oxlint-config/src/base.json"],
"categories": {
"correctness": "error",
"nursery": "error",
"pedantic": "error",
"perf": "error",
"restriction": "error",
"style": "error",
"suspicious": "error"
},
"ignorePatterns": [".agents", "coverage/", "node_modules/"],
"options": {
"denyWarnings": true,
"reportUnusedDisableDirectives": "error",
"typeAware": true,
"typeCheck": true
},
"settings": {
"node": {
"version": ">=24.14.0"
}
}
}
Use JSON only when simple inheritance is enough. JSON extends still works for shared presets, but repo-local array fields like plugins and overrides will not get the additive merge behavior provided by createOxlintConfig.
For repos using Vitest, extend from vitest.json instead of base.json to include the vitest plugin and rules:
{
"extends": ["./node_modules/@clipboard-health/oxlint-config/src/vitest.json"]
}
Override shared rules as needed:
{
"extends": ["./node_modules/@clipboard-health/oxlint-config/src/base.json"],
"rules": {
"no-console": "off"
}
}
The package includes:
base.json: the backwards-compatible JSON preset for simple extends usagevitest.json: extends base.json with the vitest plugin and rules for JSON extends usagebase preset: shared plugins, rules, and overrides exported for TypeScript compositionreact, jest, vitest presets: additive plugin presets for common repo typescreateOxlintConfig: helper for composing presets with repo-local config