Presets
Effect
18 local Effect rules, 4 official rules and the shared native baseline.
Usage
import { defineConfig } from 'oxlint'
import effect from '@totto2727/oxlint/effect'
export default defineConfig({ extends: [effect] })The preset registers the plugin and enables the local rules below at error severity. Use @totto2727/oxlint/preset for both groups.
Shared native baseline
All presets include a pinned MIT port of Ultracite 7.12.3 native core and shared ignores.
This baseline corresponds to ultracite/oxlint/core.
Run Oxlint directly, without the full Ultracite CLI.
Sources: native core configuration and Oxlint provider documentation.
All presets disable these native rules:
unicorn/prefer-bigint-literals: conflicts with the official Effect no-bigint-literals policy.preserve-caught-error: requires native Error.cause instead of the local error field convention.prefer-const: duplicates the broader local no-let rule.
Tests and application sources use the same rules. Presets exclude upstream per-file overrides and test-only exemptions. TypeScript and combined presets allow no-redundant-alias in **/*.gen.ts files. React and type-aware presets, JavaScript plugins and oxfmt integration require separate configuration.
Included local rules
- 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 documented 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: Use Schema validation instead of handwritten 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.
Official Effect policy layer
The Effect preset enables four rules from the official Effect Oxc sources. The upstream tools package is private. The library vendors MIT implementations in its rules/ namespace. It does not install an external npm plugin or include the full upstream native configuration. These rules use error severity:
rules/no-bigint-literalsrules/no-import-from-barrel-packagerules/no-opaque-instance-fieldsrules/no-unused-internal
rules/no-js-extension-imports is exported but explicitly off in every preset.
It duplicates the local extension rules, including mjs/cjs handling.
Its TypeScript-only conversion conflicts with mode js.
Use require-import-extension and consistent-import-extension instead.
Exceptions
no-effect-import-as and no-effect-subpath-import are opt-in because they conflict with the official Effect module namespace policy. The no-node-imports allowlist contains child_process, crypto, os and util. Override the rule to allow other node: names.
Keep additional exceptions narrow and give specific reasons.