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
32 changes: 32 additions & 0 deletions src/docs/guide/usage/linter/js-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,38 @@ Paths are resolved relative to the config file itself.
}
```

### Plugin aliases

You can also define a different name (alias) for a plugin. This is useful if:

- Plugin name clashes with name of a native Oxlint plugin.
- Plugin name is very long.
- You want to use a plugin that Oxlint supports natively, but a specific rule you need is not yet implemented in Oxlint's native version.

```json
{
"jsPlugins": [
// `jsdoc` is a reserved name, as Oxlint supports it natively
{
"name": "jsdoc-js",
"specifier": "eslint-plugin-jsdoc"
},
// Shorten name
{
"name": "short",
"specifier": "eslint-plugin-with-name-so-very-very-long"
},
// List plugins you don't want to alias as just specifiers
"eslint-plugin-whatever"
],
"rules": {
"jsdoc-js/check-alignment": "error",
"short/rule1": "error",
"whatever/rule2": "error"
}
}
```

## Writing JS plugins

### ESLint-compatible API
Expand Down