@hyperobjekt/oxc-config
v0.1.1
Published
Shared Oxlint and Oxfmt configuration for Hyperobjekt projects
Readme
@hyperobjekt/oxc-config
Shared, low-configuration Oxlint and Oxfmt presets for Hyperobjekt projects.
Installation
pnpm add --save-dev --save-exact oxlint oxfmt
pnpm add --save-dev @hyperobjekt/oxc-configUsage
Create oxlint.config.mts at the project root. TypeScript projects should use
the recommended preset:
import config from "@hyperobjekt/oxc-config/lint/recommended";
export default config;React projects should use the React preset:
import config from "@hyperobjekt/oxc-config/lint/react";
export default config;Next.js projects should use the Next preset, which also enables React and JSX accessibility rules:
import config from "@hyperobjekt/oxc-config/lint/next";
export default config;Create oxfmt.config.mts for formatting:
import config from "@hyperobjekt/oxc-config/format";
export default config;Keep project-specific overrides in the local config files. The shared presets
use stable built-in Oxlint plugins only. Type-aware linting and JavaScript
plugins are intentionally not enabled; keep tsc --noEmit as the type-checking
contract.
Scripts
{
"scripts": {
"check": "oxlint . && oxfmt --check .",
"check:fix": "oxlint --fix . && oxfmt .",
"lint": "oxlint .",
"lint:fix": "oxlint --fix .",
"format": "oxfmt .",
"format:check": "oxfmt --check .",
"typecheck": "tsc --noEmit --pretty false",
"verify": "pnpm check && pnpm typecheck && pnpm build"
}
}Oxfmt formats JavaScript, TypeScript, JSON, CSS, SCSS, GraphQL, TOML, YAML, Markdown, and MDX. Oxlint only lints JavaScript and TypeScript-family source files. Retain Stylelint in projects that need semantic CSS or SCSS rules.
