eslint-config-preact icon indicating copy to clipboard operation
eslint-config-preact copied to clipboard

Declare plugins as peer dependencies

Open KamilaBorowska opened this issue 1 year ago • 1 comments

ESLint documentation in https://eslint.org/docs/latest/extend/shareable-configs#publishing-a-shareable-config says the following:

If your shareable config depends on a plugin, you should also specify it as a peerDependency (plugins will be loaded relative to the end user's project, so the end user is required to install the plugins they need).

Fixes #19.

It may also make sense to update eslint-plugin-jest to 27, but this is too big of a change to have as a part of this pull request.

KamilaBorowska avatar Dec 27 '23 20:12 KamilaBorowska

peerDeps vs deps shouldn't make any difference in terms of module resolution, this is unlikely to fix #19. Their comment directing users to list plugins as peerDeps is likely in the interest of avoiding duplicates, especially with multiple versions.

As some package managers do not install peer deps by default, I see this only as a regression in behavior as now users will need to manually install the plugins this config uses.

rschristian avatar Dec 28 '23 03:12 rschristian