Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/oxlint/src-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const dummyOptions: unknown[] = [],
/**
* Define a plugin.
*
* Converts any rules with `createOnce` method to have an ESLint-compatible `create` method.
* If any of the plugin's rules use the Oxlint alternative `createOnce` API,
* add ESLint-compatible `create` methods to those rules, which delegate to `createOnce`.
* This makes the plugin compatible with ESLint.
*
* The `plugin` object passed in is mutated in-place.
*
Expand Down Expand Up @@ -38,8 +40,9 @@ export function definePlugin(plugin: Plugin): Plugin {
/**
* Define a rule.
*
* If rules does not already have a `create` method, create an ESLint-compatible `create` method
* which delegates to `createOnce`.
* If `rule` uses the Oxlint alternative `createOnce` API, add an ESLint-compatible
* `create` method to the rule, which delegates to `createOnce`.
* This makes the rule compatible with ESLint.
*
* The `rule` object passed in is mutated in-place.
*
Expand Down
Loading