An oxlint plugin is a plain object with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mpsuesser/effect-oxlint/llms.txt
Use this file to discover all available pages before exploring further.
meta.name string and a rules record mapping rule names to CreateRule instances. effect-oxlint exports a Plugin module with two functions — Plugin.define and Plugin.merge — that make it straightforward to assemble rules into a plugin and export it from a module that oxlint can load.
What an oxlint plugin is
At runtime, oxlint expects a plugin to match theOxlintPlugin shape:
Plugin.define constructs this object from a name and a map of rule names to CreateRule values. Because Rule.define (and all the convenience factories like Rule.banMember) return CreateRule, you can pass them directly without any additional wrapping.
Plugin.define
Pass aname and a rules record to Plugin.define. Rule names should use kebab-case — oxlint references them as plugin-name/rule-name in diagnostics and configuration.
default is the value oxlint reads when it loads the plugin module.
Naming conventions
Plugin name
Use kebab-case for the plugin name (e.g.
my-effect-rules). oxlint prefixes every rule with this name in diagnostics: my-effect-rules/no-json-parse.Rule keys in the rules record
Use kebab-case for rule keys (e.g.
no-json-parse). The key you choose here is what users write in their oxlint configuration, not the name field on the RuleConfig passed to Rule.define.Auto-generated names from convenience factories
Convenience factories (
Rule.banMember, Rule.banCallOf, etc.) auto-generate an internal rule name from their arguments. For example, Rule.banMember('JSON', ['parse', 'stringify'], ...) generates the internal name ban-json-parse-stringify. This name appears in tracing spans but is not the name exposed to oxlint — that comes from the key you assign in the rules record.Plugin.merge
Plugin.merge combines multiple OxlintPlugin objects into one. This is useful for splitting a large rule set across several files and joining them at the export boundary, or for re-exporting third-party plugins alongside your own.
If two plugins define a rule with the same name, the later plugin’s definition wins. The merged plugin’s
meta.name is the joined names of all input plugins separated by +.Recommended module structure
For projects with more than a handful of rules, split the rule definitions and plugin assembly across separate files:plugin.ts file a clear manifest of everything the plugin exposes.
How oxlint loads plugins
oxlint resolves plugins through its configuration file. Reference the plugin’s module path under theplugins key, then enable individual rules under rules:
plugin.ts is the OxlintPlugin object produced by Plugin.define. oxlint reads meta.name from it to namespace the rules.
Using Plugin.merge for large rule sets
Plugin.merge is especially helpful when you want to organise rules into domain-specific sub-plugins and compose them at the top level:
Effect patterns
The full set of Effect idioms used in effect-oxlint rules.
Handler error channel
Why handlers must have error channel
never and how to handle fallible sub-effects.