Presets
Effect
Effect-oriented policy with 22 rules.
Usage
import { defineConfig } from 'oxlint'
import effect from '@totto2727/oxlint/effect'
export default defineConfig({ extends: [effect] })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 Effectrules/no-bigint-literalspolicy.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 customrules/no-letpolicy 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
- no-unused-internal: Keep internal exports used and out of public API signatures.
- no-bigint-literals: Use BigInt construction instead of bigint literal syntax.
- no-import-from-barrel-package: Import specific modules rather than value exports from barrels.
- no-opaque-instance-fields: Keep Schema.Opaque classes free of instance members.
- force-array-empty: Use Effect Array predicates for empty and non-empty checks.
- force-iterable-empty: Use Iterable.isEmpty rather than size-based emptiness checks.
- force-predicate: Replace direct null, undefined and typeof comparisons with predicates.
- force-string-empty: Use String.isEmpty and String.isNonEmpty for empty strings.
- no-effect-runtime-run: Keep runtime execution at explicitly documented workflow boundaries.
- no-error-cause-option: Preserve raw errors using an explicit error field.
- no-error-property-access: Pass raw error values through without inspecting their properties.
- no-fetch: Use Effect HttpClient instead of calling global fetch.
- no-instanceof-error: Avoid normalizing caught values using instanceof Error.
- no-js-date: Use Effect DateTime and Duration instead of native Date operations.
- no-node-imports: Prefer Effect Platform services over direct Node built-ins.
- no-option-tag-comparison: Use Option.isSome and Option.isNone instead of comparing _tag.
- no-raw-hono-create-middleware: Keep Hono middleware creation behind an Effect-aware wrapper.
- no-sync-decode: Keep Schema decoding in Effect or Exit rather than Sync or Promise.
- no-type-predicate: Prefer schema-derived validation to hand-written type predicates.
- prefer-is-nullish: Treat null and undefined uniformly unless the distinction is intentional.
- prefer-non-unknown-decode: Use typed Schema decoders when the input type is already known.
- require-top-level-decoder: Construct and cache schema decoders at module scope.
Exceptions
The preset includes four official Effect rules, not the entire upstream native lint configuration. It permits module namespace imports and configures the barrel rule with regex patterns for effect/@effect package roots and lowercase subpaths, plus relative index imports. Legacy no-effect-import-as/no-effect-subpath-import are opt-in because they impose the opposite convention. The overlapping no-js-extension-imports is also off. no-unused-internal only scans cwd/packages/**/src .ts files and caches analysis per process. The no-node-imports preset allowlist contains child_process, crypto, os and util; other node: names require an explicit override.
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.