TheDocumentation 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.
Plugin module provides two functions for assembling oxlint plugins: Plugin.define wraps a name and a rule map into an OxlintPlugin object, and Plugin.merge combines multiple plugins into one, letting you split rules across files and compose them at the entry point. Both functions work directly with the @oxlint/plugins CreateRule type that Rule.define produces.
Plugin.define
Creates a typed OxlintPlugin from a plugin name and a record of rule creators.
The plugin name. This becomes the
meta.name field on the returned plugin and is used as the namespace prefix in oxlint rule identifiers (e.g., my-plugin/rule-name).A map of rule names to rule creator functions. Each value is a
CreateRule — the object returned by Rule.define.An oxlint plugin object with
meta.name and a rules record. Pass this to oxlint’s plugin configuration or to Plugin.merge.Complete plugin file example
A plugin file typically callsPlugin.define and uses export default so oxlint’s plugin loader can pick it up:
plugin.ts
The
export default pattern is required for oxlint to load the plugin. When you reference this file in your .oxlintrc.json, oxlint imports it and reads the default export as the plugin object.Plugin.merge
Combines multiple OxlintPlugin objects into a single plugin.
Two or more plugins to merge. If two plugins define a rule with the same name, the later plugin’s definition wins.
A merged plugin whose
meta.name is the joined names of all input plugins (e.g., "plugin-a+plugin-b") and whose rules record is the union of all input rules.Splitting rules across modules
UsePlugin.merge to keep related rules in separate files and compose them at the top level:
plugin.ts
"effect-gen+imports+types". Each rule retains the key it was registered under, so rule identifiers in .oxlintrc.json do not change.
Types
OxlintPlugin
Re-exported from @oxlint/plugins as Plugin in effect-oxlint. Represents the object shape oxlint’s plugin loader expects:
effect-oxlint — you do not need a direct @oxlint/plugins dependency: