@getresponse/oxlint-config
v1.0.0
Published
GetResponse Oxlint config
Downloads
213
Readme
@getresponse/oxlint-config
An opinionated Oxlint ruleset targeting TypeScript + React web apps.
Requirements
- Oxlint
^1.62.0 - Node
>=22.18(or^20.19) — required by Oxlint's TypeScript config support
Installation
npm i -D oxlint @getresponse/oxlint-configFor type-aware TypeScript rules (recommended for TS projects), also install oxlint-tsgolint:
npm i -D oxlint-tsgolintUsage
Create oxlint.config.ts in your project root:
import { defineConfig } from 'oxlint';
import config from '@getresponse/oxlint-config';
export default defineConfig({
extends: [config],
});With local overrides:
import { defineConfig } from 'oxlint';
import config from '@getresponse/oxlint-config';
export default defineConfig({
extends: [config],
overrides: [
{
files: ['src/legacy/**/*.ts'],
rules: {
'typescript/no-explicit-any': 'off',
},
},
],
});Then run:
npx oxlintTypeScript
Oxlint walks up from each linted file to find the nearest tsconfig.json automatically. Type-aware rules require the oxlint-tsgolint package; this config enables them automatically when TypeScript is detected in your project's dependencies.
For most projects, no extra configuration is needed.
When you might want a dedicated tsconfig.oxlint.json
The package does not look for or use a separate lint-time tsconfig (this differs from the old ESLint package which auto-detected tsconfig.eslint.json). If you need a different TS configuration for linting than for building, point oxlint at it via CLI:
{
"scripts": {
"lint": "oxlint --tsconfig ./tsconfig.oxlint.json"
}
}Reasonable use cases:
- Your
tsconfig.jsonexcludes test files (exclude: ["**/*.test.ts"]) but you want type-aware rules to still work in tests - Monorepo with several
tsconfig.jsons and you need oxlint to use a specific root - Path mappings (
paths/baseUrl) that exist only in a separate config
If none of these apply, skip it.
Dynamic rules
Plugin rulesets are enabled automatically when the corresponding package is detected in your package.json dependencies:
| Detected dependency | Preset enabled |
|-------------------------------|----------------|
| typescript | TypeScript rules (with type-aware analysis) |
| react | React + React Hooks rules |
| jest | Jest rules |
| @playwright/test / playwright | Playwright rules (scoped to test files via playwright.config.*) |
Files ignored by .gitignore are skipped automatically.
Stylistic rules
Stylistic rules (@stylistic/*) are loaded via Oxlint's JS Plugins bridge using @stylistic/eslint-plugin — Oxlint itself doesn't implement most stylistic rules natively. This trades raw speed for compatibility; if you switch to a dedicated formatter (e.g., oxfmt, Prettier), you can override these rules off in your local config.
Mixins
Additional opt-in rulesets:
import { defineConfig } from 'oxlint';
import config from '@getresponse/oxlint-config';
import a11y from '@getresponse/oxlint-config/a11y';
export default defineConfig({
extends: [config, a11y],
});| Mixin | Description |
|------------------------------------|---|
| @getresponse/oxlint-config/a11y | Accessibility rules from Oxlint's native jsx-a11y plugin, with extras bridged via eslint-plugin-jsx-a11y |
Rules list
The web version of the rules list is available on GitHub Pages.
