Skip to content

v0.2.0

Choose a tag to compare

@mpsuesser mpsuesser released this 24 Apr 10:28
· 5 commits to main since this release

Highlights

  • Effect bump — compatible with effect@4.0.0-beta.57 / @effect/vitest@4.0.0-beta.57.
  • New Rule.banCallOfMember(obj, prop, opts) factory plus memberCalls entry on BanMultipleSpec for banning obj.prop(...) method-call patterns (e.g. Effect.runSync, console.log).
  • Split SourceCode.getText into getText() (whole file) and getNodeText(node, …) (node-specific), removing the awkward Option<Node> overload.
  • New AST.calleeIdentifier(node) — unified callee-name extractor accepting both CallExpression and NewExpression.
  • Tighter generics on AST.findAncestor / AST.hasAncestor — the returned node's type is now narrowed to the supplied literal (mirrors AST.narrow).
  • Kebab-case rule namesbanStatement('ThrowStatement') now produces ban-throw-statement (not ban-ThrowStatement). Idempotent on already-kebab input.
  • Testing moved to /testing subpath — import with import * as Testing from 'effect-oxlint/testing' so production bundles don't ship the mock builders.
  • Handler error channel documented — visitor handlers and the create generator have a fixed never error channel; new README section + JSDoc explain the Effect.catch pattern for fallible sub-effects.

Breaking changes

  • Testing is no longer re-exported from the main entry; use the effect-oxlint/testing subpath.
  • Flat accessors ast / cwd / filename / id / report / sourceCode / text are no longer exported from effect-oxlint. Use const ctx = yield* RuleContext and read .filename / .report / etc. off the service.
  • SourceCode.getText(Option<Node>, …) overload removed. Call getText() for whole-file text or getNodeText(node, …) for a node.
  • Generated rule names are now kebab-case. If you pinned ban-ThrowStatement / ban-JSON-parse in rule configs, rename to ban-throw-statement / ban-json-parse.

See CHANGELOG.md for the full list.