Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.json doesn't list peer dependencies #22

Open
jefflee-figma opened this issue Mar 4, 2024 · 0 comments
Open

package.json doesn't list peer dependencies #22

jefflee-figma opened this issue Mar 4, 2024 · 0 comments

Comments

@jefflee-figma
Copy link
Contributor

The installation instructions in the README ask users to include typescript, eslint, and typescript-eslint in their project. The technical term for this is peer dependencies.

It should be possible to specify peer dependencies in this project's package.json, so that if a project includes eslint-plugin-figma-plugins but forgets to also add the peer dependencies, npm will show a useful error message.

The primary issue is deciding how permissive or restrictive we want to be with the dependencies. I don't have a principled idea of how far into the past or future we should set the version constraints.

The simplest thing would be to set the peer dependencies to equal this package's dependencies, i.e., accepting all minor versions equal to or newer than the versions of the peer deps directly used by this package's package.json. The upside is that we don't need to do any extra work to verify that the peer dependency versions will work with the plugin. The downside is that it may be more restrictive than it needs to be; the plugin may be compatible in practice with older versions of the peer dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant