Skip to content

nkzw-tech/oxlint-config

Repository files navigation

@nkzw/oxlint-config

Opinionated Oxlint config with sensible defaults.

Installation & Usage

With Oxlint v1.46+:

npm install -D @nkzw/oxlint-config @nkzw/eslint-plugin eslint-plugin-no-only-tests eslint-plugin-perfectionist eslint-plugin-react-hooks eslint-plugin-unused-imports

Note

Due to a limitation in Oxlint's configuration resolver, you have to directly install the JS plugins for now.

In your oxlint.config.ts:

import nkzw from '@nkzw/oxlint-config';
import { defineConfig } from 'oxlint';

export default defineConfig({
  extends: [nkzw],
});

Then run pnpm oxlint or npm oxlint.

Philosophy & Principles

Use this configuration if these principles resonate with you:

  • Error, Never Warn: Warnings are noise and get ignored. Either it's an issue, or it isn't. This config forces developers to fix problems or explicitly disable the rule with a comment.
  • Strict, Consistent Code Style: When multiple approaches exist, this configuration enforces the strictest, most consistent code style, preferring modern language features and best practices.
  • Prevent Bugs: Problematic patterns such as instanceof are not allowed, forcing developers to choose more robust patterns. Debug-only code such as console.log or test.only are disallowed to avoid unintended logging in production or accidental CI failures.
  • Fast: Slow rules are avoided. For example, TypeScript's noUnusedLocals check is preferred over no-unused-vars.
  • Don't get in the way: Subjective or overly opinionated rules (e.g. style preferences) are disabled. Autofixable rules are preferred to reduce friction and save time.

Included Plugins & Rules

This configuration consists of the most useful and least annoying rules from the following ESlint/Oxlint plugins:

Suggestions

This configuration is meant to be used with:

Alternatives

If you are using ESLint, check out @nkzw/eslint-config.

About

Opinionated Oxlint config with sensible defaults.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages