@fdhl/oxlint-config
v1.1.0
Published
An opinionated Oxlint config for TypeScript projects
Maintainers
Readme
@fdhl/oxlint-config
An opinionated, production-ready Oxlint configuration for TypeScript and React projects. Requires oxlint >= 1.51.0.
Quick Start
pnpm add -D @fdhl/oxlint-config oxlint
# or
npm install --save-dev @fdhl/oxlint-config oxlintCreate oxlint.config.js in your project root:
import config from "@fdhl/oxlint-config";
export default config;Run the linter:
npx oxlint .What's Included
Oxlint Native Plugins
| Plugin | Purpose |
| ------------ | ------------------------------- |
| typescript | TypeScript-specific rules |
| unicorn | Modern JS best practices |
| react | React and React DOM rules |
| node | Node.js best practices |
| import | Import consistency and ordering |
JS Plugins (ESLint-compatible, bridged via oxlint)
| Plugin | Purpose |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| eslint-plugin-perfectionist | Sorted imports, exports, named items |
| eslint-plugin-react-hooks | Rules of hooks, exhaustive deps |
| eslint-plugin-unused-imports | Auto-remove unused imports and vars |
| eslint-plugin-no-only-tests | Prevent .only in test files |
Design Principles
- Explicit Opt-in Rules — Oxlint's
correctnesscategory is disabled; only hand-picked rules are enabled, so you know exactly what's enforced - TypeScript-aware — Bans
@ts-ignore, prevents unsafe type patterns, enforcesprefer-as-const - Modern JS — ES2024+, prefers
at(),includes(),structuredClone(), node protocol imports - React Best Practices — Blocks legacy APIs (
findDOMNode,dangerouslySetInnerHTML), enforces hooks rules - Import Hygiene — Sorted imports/exports, no duplicates, unused imports auto-removed
- Developer UX — Blocks
@nocommittags and.onlytests from reaching production
VS Code Setup
Install the Oxlint VS Code extension, then add to .vscode/settings.json:
{
"oxc.enable": true
}License
MIT
