|
| 1 | +--- |
| 2 | +outline: [2, 3] |
| 3 | +--- |
| 4 | + |
| 5 | +# Plugins |
| 6 | + |
| 7 | +Oxlint supports several of the most popular ESLint plugins out of the box with |
| 8 | +most rules in `recommended` configs already implemented. |
| 9 | + |
| 10 | +:::warning |
| 11 | +Oxlint does not support custom plugins at this time. We have plans to implement |
| 12 | +this in the future. You can track its status on [our |
| 13 | +backlog](https://github.com/oxc-project/backlog/issues/40). |
| 14 | +::: |
| 15 | + |
| 16 | +## Enabling Plugins |
| 17 | + |
| 18 | +You can enable plugins using the `--<plugin-name>-plugin` CLI flag. For example, |
| 19 | +to enable `eslint-plugin-import`, run |
| 20 | + |
| 21 | +```sh |
| 22 | +oxlint --import-plugin |
| 23 | +``` |
| 24 | + |
| 25 | +Once enabled, rules in categories you have enabled will automatically be turned |
| 26 | +on. For example, |
| 27 | + |
| 28 | +```sh |
| 29 | +oxlint --import-plugin -W correctness -W suspicious |
| 30 | +``` |
| 31 | + |
| 32 | +Will enable all `correctness` and `suspicious` rules in the `import` plugin, as |
| 33 | +well as the base rule set. Note that `correctness` rules are turned on by |
| 34 | +default. |
| 35 | + |
| 36 | +## Disabling Plugins |
| 37 | + |
| 38 | +Several plugins are enabled by default, and are listed below. You can disable |
| 39 | +them with the `--no-<plugin-name>-plugin` flag. For example, to disable |
| 40 | +`eslint-plugin-unicorn`, run: |
| 41 | + |
| 42 | +```sh |
| 43 | +oxlint --no-unicorn-plugin |
| 44 | +``` |
| 45 | + |
| 46 | +:::info |
| 47 | +run `oxlint --help` to see a full list of flags to enable or disable plugins. |
| 48 | +::: |
| 49 | + |
| 50 | +## Supported Plugins |
| 51 | + |
| 52 | +:::info |
| 53 | +You can also find this information on the [`linter product |
| 54 | +plan`](https://github.com/oxc-project/oxc/issues/481) issue on GitHub. |
| 55 | +::: |
| 56 | + |
| 57 | +| Plugin Name | Default? | Issue | Notes | |
| 58 | +| ---------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | |
| 59 | +| [`typescript-eslint`](https://typescript-eslint.io/rules/) | ✅ | [#2180](https://github.com/oxc-project/issues/2180) | Typescript-specific rules from `@typescript-eslint/eslint-plugin`. We do not support type-aware rules at this time. | |
| 60 | +| [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn) | ✅ | [#684](https://github.com/oxc-project/issues/684) | |
| 61 | +| [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) | ✅ | [#1022](https://github.com/oxc-project/issues/1022) | | |
| 62 | +| [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) | ✅ | [#2174](https://github.com/oxc-project/issues/2174) | | |
| 63 | +| [`eslint-plugin-react-perf`](https://github.com/cvazac/eslint-plugin-react-perf) | | [#2041](https://github.com/oxc-project/issues/2041) | | |
| 64 | +| [`eslint-plugin-next`](https://nextjs.org/docs/pages/building-your-application/configuring/eslint#eslint-plugin) | | [#1929](https://github.com/oxc-project/issues/1929) | | |
| 65 | +| `oxc` | ✅ | N/A | Custom oxc-specific rules, as well as some rules ported from [deepscan](https://deepscan.io/) | |
| 66 | +| `oxc-security` | | N/A | Custom oxc-specific security and vulnerability detection rules. | |
| 67 | +| [`eslint-plugin-import`](https://github.com/import-js/eslint-plugin-import) | | [#1117](https://github.com/oxc-project/issues/1117) | | |
| 68 | +| [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc) | | [#1170](https://github.com/oxc-project/issues/1170) | | |
| 69 | +| [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) | | [#1141](https://github.com/oxc-project/issues/1141) | | |
| 70 | +| [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n) | | [#493](https://github.com/oxc-project/issues/493) | Rules use `node` as the plugin prefix (e.g. `node/no-exports-assign` | |
| 71 | +| [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise) | | [#4655](https://github.com/oxc-project/issues/4655) | | |
| 72 | +| [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) | | [#492](https://github.com/oxc-project/issues/492) | | |
| 73 | +| [`eslint-plugin-vitest`](https://github.com/vitest-dev/eslint-plugin-vitest) | | [#4656](https://github.com/oxc-project/issues/4656) | | |
| 74 | + |
| 75 | +## Adding New Plugins |
| 76 | + |
| 77 | +Do you have a favorite ESLint plugin that you'd like to see supported in Oxlint? |
| 78 | +Please open [a feature |
| 79 | +request](https://github.com/oxc-project/oxc/issues/new?assignees=&labels=C-enhancement%2CA-linter&projects=&template=feature_request.md&title=linter:%20support%20my%20favorite%20plugin). |
| 80 | +Please be aware that we have no plans on supporting rules in plugins that require special |
| 81 | +parsers, such as `eslint-plugin-vue` and `eslint-plugin-svelte`, though we are |
| 82 | +open to supporting rules in these plugins that only affect script tags in their |
| 83 | +source files. |
0 commit comments