Rules

no-effect-import-as

Keep Effect ecosystem imports named and unaliased.

Purpose and behavior

Keep Effect ecosystem imports named and unaliased.

Reports namespace imports and renamed named imports from effect and @effect packages. Direct named imports are allowed. The rule is about import syntax, not all aliases in the program.

Options

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

Invalid example

import * as Effect from 'effect'
import { Schema as S } from 'effect'

Valid example

import { Effect, 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-import-as -- 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-import-as.ts · Tests