-
-
Notifications
You must be signed in to change notification settings - Fork 879
Description
Adding a JS plugin disables all default built-in plugins.
If your original config is:
{
"rules": { "no-debugger": "error" }
}Then you add a JS plugin:
{
"plugins": [ "../custom-plugin.js" ],
"rules": { "no-debugger": "error" }
}This has the unexpected side effect of also disabling the all default plugins ("react", "unicorn", "typescript", "oxc").
i.e. it's like adding "plugins": [], as well as adding a custom plugin.
This doesn't seem ideal. It tripped me up when testing JS plugins, and I imagine it'll trip up users too. It's surprising that when you add something, things get taken away.
I'm not sure best way to fix. One option is for JS plugins to be specified in a separate option e.g.:
{
"externalPlugins": [ "../custom-plugin.js" ]
}(I suggest "externalPlugins" rather than "jsPlugins", in case we add WASM plugins later on)
But @camc314 you've not been keen on this before. Do you seen any other way to avoid this surprising behavior?