Changelog - 2026-10-17
lenientFallback for the oxlint presets
New FeatureIn one line. If '' and 0 fall back on purpose in your project, opt out of the strict || check in one line instead of overriding the rule by hand.
typescript
// .configs/oxlint.config.mts
import { defineConfig } from 'oxlint';
import { OxlintConfigs } from '@venizia/dev-configs/linters';
export default defineConfig(OxlintConfigs.create({ lenientFallback: true }));What changed
OxlintConfigs.create({ lenientFallback }). WithlenientFallback: true,prefer-nullish-coalescingallows||where the left side is a string or a number, soopts.name || 'guest'andopts.limit || 20pass. It still flags||on objects and booleans.- The same option on the browser and React presets.
BrowserOxlintConfigs.create()andReactOxlintConfigs.create()take it too. - The default is unchanged.
oxlintConfigsandOxlintConfigs.create()stay strict, because||also swallows a real''or0.
Who is affected
- A project that overrode the rule by hand. If your config spreads
oxlintConfigsand setsPreferNullishCoalescingRule.build({ ignorePrimitives: { string: true, number: true } }), replace both withOxlintConfigs.create({ lenientFallback: true }). - Everyone else. Nothing changes.