v0.2.0
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 plusmemberCallsentry onBanMultipleSpecfor banningobj.prop(...)method-call patterns (e.g.Effect.runSync,console.log). - Split
SourceCode.getTextintogetText()(whole file) andgetNodeText(node, …)(node-specific), removing the awkwardOption<Node>overload. - New
AST.calleeIdentifier(node)— unified callee-name extractor accepting bothCallExpressionandNewExpression. - Tighter generics on
AST.findAncestor/AST.hasAncestor— the returned node'stypeis now narrowed to the supplied literal (mirrorsAST.narrow). - Kebab-case rule names —
banStatement('ThrowStatement')now producesban-throw-statement(notban-ThrowStatement). Idempotent on already-kebab input. Testingmoved to/testingsubpath — import withimport * as Testing from 'effect-oxlint/testing'so production bundles don't ship the mock builders.- Handler error channel documented — visitor handlers and the
creategenerator have a fixednevererror channel; new README section + JSDoc explain theEffect.catchpattern for fallible sub-effects.
Breaking changes
Testingis no longer re-exported from the main entry; use theeffect-oxlint/testingsubpath.- Flat accessors
ast/cwd/filename/id/report/sourceCode/textare no longer exported fromeffect-oxlint. Useconst ctx = yield* RuleContextand read.filename/.report/ etc. off the service. SourceCode.getText(Option<Node>, …)overload removed. CallgetText()for whole-file text orgetNodeText(node, …)for a node.- Generated rule names are now kebab-case. If you pinned
ban-ThrowStatement/ban-JSON-parsein rule configs, rename toban-throw-statement/ban-json-parse.
See CHANGELOG.md for the full list.