Rules

no-effect-subpath-import

Prefer public Effect package roots over deep subpaths.

Purpose and behavior

Prefer public Effect package roots over deep subpaths.

The rule checks static imports and allows effect, @effect/ and exactly effect/unstable/. The rule reports deeper unstable paths and other Effect subpaths. It does not check re-exports or dynamic imports.

Options

No configurable options. Enable with "rules/no-effect-subpath-import": "error".

Invalid example

import { Schema } from 'effect/Schema'

Valid example

import { Schema } from 'effect'

Fixes and exceptions

This rule provides no automatic fix. Rewrite the code to preserve its intended behavior.

For a boundary exception, use oxlint-disable-next-line rules/no-effect-subpath-import -- reason. Examples cover this rule only and may omit imports or declarations.

Source and tests

Opt-in compatibility rule. Both presets omit it because its import convention conflicts with their policy or its reports duplicate other rules.

no-effect-subpath-import.ts · Tests