Rules

no-effect-subpath-import

Prefer public Effect package roots over deep subpaths.

Purpose and behavior

Prefer public Effect package roots over deep subpaths.

Checks static imports. Allows effect, @effect/, and exactly effect/unstable/. Deeper unstable paths and other Effect subpaths are reported. It does not inspect export declarations 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 reports diagnostics without an automatic fix. Rewrite the code deliberately rather than guessing its intended semantics.

For a genuine boundary exception, use an oxlint-disable-next-line rules/no-effect-subpath-import -- reason comment. Examples illustrate this rule alone and may omit imports and declarations.

Source and tests

Opt-in compatibility rule. Not enabled by either preset because its import convention conflicts or its diagnostics overlap with the selected default policy.

no-effect-subpath-import.ts · Tests