Presets

TypeScript

Generic TypeScript policy with 8 rules.

Usage

import { defineConfig } from 'oxlint'
import typescript from '@totto2727/oxlint/typescript'

export default defineConfig({ extends: [typescript] })

The preset registers the plugin and enables every listed rule with error severity. Use @totto2727/oxlint/preset to combine both groups.

Shared native baseline

Both group presets and the combined preset use a pinned MIT port of the native core configuration and shared ignores from Ultracite 7.12.3, corresponding to its upstream ultracite/oxlint/core export. Only these native configuration sources are included in the library. The full Ultracite CLI package and its unnecessary transitive dependencies are not imported. This avoids the unused CLI dependency advisory identified during the package audit, without changing the selected native rule policy. The runtime and command remain Oxlint directly. Verified version sources: native core configuration and official Oxlint provider documentation. The library flattens its native core configuration and rules into each preset's top-level configuration, rather than adding a second preset to extends. Native core settings and shared ignore patterns are retained. All upstream per-file overrides are discarded, including test-specific relaxations. Test files are not excluded by this policy. The library's own **/*.gen.ts no-redundant-alias allowance remains in TypeScript and combined presets.

Three native rules are explicitly off in every group, including TypeScript, to make composition safe in either order:

  • unicorn/prefer-bigint-literals: the opposite fix of the official Effect rules/no-bigint-literals policy.
  • preserve-caught-error: assumes native Error.cause, while the custom Effect error convention preserves the original cause in an error field.
  • prefer-const: duplicates declarations already covered by the broader custom rules/no-let policy when TypeScript is selected.

The count of 34 custom rules is unchanged. These three adjustments are native baseline settings, not new custom rules. React presets, type-aware presets, Ultracite JavaScript plugins and oxfmt configuration are not imported automatically. Keep the existing Oxlint/Vite+ command entrypoints and formatter configuration unless you independently opt into another integration.

Included custom rules

Exceptions

Generated **/*.gen.ts files allow no-redundant-alias. The compatibility force-ts-extension rule is not enabled. Extension normalization defaults to ts, and can be overridden with mode js.

Tests receive the same rules as application sources. No upstream test-file overrides are inherited. Any additional caller-defined exception must be narrow and reasoned.