All notable changes to this project are documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Updated
effect(and@effect/vitest) to4.0.0-beta.100; the published peer range is now^4.0.0-beta.100.
- Updated
effect(and@effect/vitest) to4.0.0-beta.78; the published peer range is now^4.0.0-beta.78. - Switched the npm publish workflow to OIDC trusted publishing (no
NPM_TOKEN): Node 24 plusnpm@latestfor npm >= 11.5.1.
- Added JSR module documentation metadata to both public entrypoints.
- Removed JSR slow-type diagnostics by making the
RuleContextservice base and testing context return type explicit. - Updated the JSR publish workflow to pass fast-check and rely on GitHub Actions provenance without
--allow-slow-types.
Plugin.definenow generatesconfigs.recommendedandconfigs.allobjects foroxlint.config.ts; generated configs register the plugin throughjsPluginsand enable fully-qualified rule IDs explicitly.- Optional
specifiersupport onPlugin.defineso generated configs can use a published package name while keeping the runtimemeta.namerule namespace stable. - Type-checked curated recommendations:
recommended.rulesis now constrained to the keys of the suppliedrulesobject. tsdownbuild configuration that emits runnable ESM and declaration files underdist/for npm consumers.
- npm exports now point at built
distfiles instead of raw.tssource, so oxlint can load published plugins fromnode_moduleswithout Node type-stripping failures. - Updated dependency pins to Effect
4.0.0-beta.70, Bun1.3.14, TypeScript6.0.3,@effect/tsgo0.11.0, and current supporting tool versions.
exports.typescondition and top-leveltypesfield inpackage.jsonso TypeScript tools that don't read conditional exports still pick up type information.Requirementssection inREADME.mddocumenting thateffect-oxlintships TypeScript source (no compileddist/) and listing supported runtimes / bundler configurations.- Subpath export
effect-oxlint/testingfor theTestingmodule so production bundles don't pull in test-only builders. AST.calleeIdentifier(node)— unified callee-name extractor accepting bothCallExpressionandNewExpression. Replaces the privatenewExprCalleeNamehelper previously duplicated inRule.ts.Rule.banCallOfMember(obj, prop, opts)factory andmemberCallsentry onBanMultipleSpecfor banningobj.prop(...)method-call patterns (e.g.Effect.runSync,console.log). 6 new unit tests plus amemberCallscase onbanMultiple.SourceCode.getNodeText(node, beforeCount?, afterCount?)— clear companion to the no-arggetText()(whole file), replacing the awkwardOption<Node>overload.- "Handler Error Channel" section in
README.mdand expanded JSDoc onRule.define/EffectHandlerdocumenting that handlers have a fixednevererror channel and must catch fallible sub-effects internally.
- Bumped
effectand@effect/vitestfrom4.0.0-beta.47to4.0.0-beta.57(dependency, peer, override, and README install snippets). All tests andtsgopass without any Effect-code changes. buildandcheckscripts now invokebunx --bun vp …instead of barevp …. Thevpbinary's Node shebang can't load the TypeScriptvite.config.ts; running it under Bun fixesbun run checklocally without any CI impact.- Generated rule names for
banMember/banCallOf/banNewExpr/banStatement/banCallOfMemberare now kebab-cased (ban-throw-statement,ban-new-date,ban-json-parse-stringify). The transform is idempotent on already-kebab strings. AST.findAncestor/AST.hasAncestornow carry a literal-type generic sofindAncestor(node, 'FunctionDeclaration')returnsOption<{ readonly type: 'FunctionDeclaration'; readonly parent?: unknown }>(mirrorsAST.narrow).src/Rule.tsnow reusesAST.calleeIdentifierinstead of a privatenewExprCalleeNameduplicate.
.npmignore— redundant with thefileswhitelist inpackage.json.npm pack --dry-runconfirms the tarball still contains onlysrc/,README.md,LICENSE,CHANGELOG.md, andpackage.json.- Flat named re-exports (
ast,cwd,filename,id,report,sourceCode,text) from the maineffect-oxlintentrypoint. Useyield* RuleContextand the.filename/.report/ etc. fields on the resolved service instead. The named accessors remain onsrc/RuleContext.tsfor internal use. - The
SourceCode.getText(Option<Node>, …)overload. CallgetText()for whole-file text orgetNodeText(node, …)for node-specific text.
- Bun version pinning drift in
AGENTS.md(bun@1.3.11→bun@1.3.12, matchingpackage.jsonand CI). - Added
.references/to.gitignoreso local Effect source clones used for skill lookups aren't scanned byvp check/ linted as project code.
- Aligned package metadata and compatibility with
effect@4.0.0-beta.47. (#2)
Effect-first library for writing oxlint custom lint rules.
Core rule builder and convenience factories.
define— writecreateas an Effect generator withRefstate,Schema-decoded options, and typed visitorsmeta— buildRuleMetawith sensible defaultsbanMember— banobj.propmember expression accessbanImport— ban imports matching a source string or predicatebanCallOf— ban bare identifier call expressionsbanNewExpr— bannewexpressions with given callee namesbanStatement— ban a specific statement typebanMultiple— combine call, new-expr, member, import, and statement bans into one rule
Composable visitor construction.
on/onExit— single-entry visitor for enter/exit phasesmerge— combine multiple visitors (same-key handlers run sequentially)tracked— enter/exitRef<number>counter replacing mutablelet depth = 0filter— conditionally apply a visitor based on filename predicate (dual API)accumulate— collect items during traversal, analyze atProgram:exit
Option-returning pattern matchers with dual API (data-first and data-last).
matchMember/isMember— matchobj.propmember expressionsmatchCallOf/isCallOf— matchobj.prop(...)call expressionsmatchImport/isImport— match import declarations by sourcecalleeName/memberNames/importSource— identifier extractionobjectKeys/objectHasKey/objectGetValue— object expression helpersnarrow— safe node type narrowing toOptionmemberPath— extract full member chaina.b.c→['a', 'b', 'c']findAncestor/hasAncestor— parent chain walking (dual API)
Structured diagnostic construction and composable autofixes.
make/fromId— diagnostic constructorswithFix/withSuggestions— attach fixes/suggestions (dual API)replaceText/insertBefore/insertAfter/removeFix— fix operationscomposeFixes— compose multiple fix functions into one
Effect service wrapping the oxlint rule context.
RuleContext—ServiceMap.Servicewithreport,id,filename,cwd,options,sourceCode,languageOptions,settings- Convenience accessors:
id,filename,cwd,sourceCode,text,ast,report
Effectful queries over tokens, comments, scope, and source text.
- 25 wrapped methods returning
Effect<T, never, RuleContext>withOptionfor nullable results
Variable lookup and reference analysis with Option.
findVariable/findVariableUp— scope-chain lookup (dual API)isUsed/isWritten/isReadOnly— variable predicatesgetReferences/getReadReferences/getWriteReferences— reference filteringupper/childScopes/variables/throughReferences/isStrict— scope navigation
Plugin definition and composition.
define— create a typed oxlint plugin from a name and rule mapmerge— merge multiple plugins into one
Comment type predicates.
isLine/isBlock/isShebang/textisJSDoc/isDisableDirective/isEnableDirective
Token type predicates with dual API for isKeyword and isPunctuator.
isKeyword/isPunctuator— dual API (data-first and data-last)isIdentifier/isString/isNumeric/isBoolean/isNull/isTemplate/isRegularExpression/isPrivateIdentifiervalue/type— accessors
Mock builders, rule runners, and assertion helpers.
- 50+ AST node builders (
id,memberExpr,callExpr,importDecl,throwStmt,classDecl, etc.) createMockContext/mockRuleContextLayer/withMockRuleContext— mock context factoriesrunRule/runRuleMulti— run rules against visitor events and collect diagnosticsmessages/messageIds— diagnostic accessors returningOptionexpectDiagnostics/expectNoDiagnostics— assertion helpers
All @oxlint/plugins types re-exported with Oxlint prefix where needed (ESTree, OxlintPlugin, OxlintComment, OxlintToken, etc.) so consumers don't need a direct dependency for type imports.