Skip to content

Commit c3526d7

Browse files
committed
doc(linter/plugins): fix JSDoc comment for loadPlugin
1 parent d3a34f8 commit c3526d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/oxlint/src-js/plugins/load.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ export async function loadPlugin(url: string, packageName: string | null): Promi
121121
* @param url - Absolute path of plugin file as a `file://...` URL
122122
* @param packageName - Optional package name from `package.json` (fallback if `plugin.meta.name` is not defined)
123123
* @returns - Plugin details
124-
* @throws {Error} If plugin has already been registered
125-
* @throws {Error} If plugin has no name
124+
* @throws {*} If plugin throws during import
125+
* @throws {Error} If `plugin.meta.name` is `null` / `undefined` and `packageName` not provided
126126
* @throws {TypeError} If one of plugin's rules is malformed, or its `createOnce` method returns invalid visitor
127-
* @throws {TypeError} if `plugin.meta.name` is not a string
128-
* @throws {*} If plugin throws an error during import
127+
* @throws {TypeError} If `plugin.meta.name` is not a string
128+
* @throws {Error} In debug build if plugin has already been registered
129129
*/
130130
async function loadPluginImpl(url: string, packageName: string | null): Promise<PluginDetails> {
131131
if (DEBUG) {

0 commit comments

Comments
 (0)