solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
216 stars 26 forks source link

Missing peer dependency when installing with `pnpm` #19

Closed zettadam closed 2 years ago

zettadam commented 2 years ago

When installing your package using pnpm I get an error about missing peer dependency on "@typescript-eslint/utils". I know I can ignore it. Shouldn't "@typescript-eslint/utils" be in "devDependencies" instead of "dependencies"?

joshwilsonvu commented 2 years ago

Hi, thanks for using the plugin. @typescript-eslint/utils actually does have some runtime behavior, not just types, so I can't move it to devDependencies, otherwise I would.

I looked into the peer dependency warning some time ago and traced it to a transitive dependency of the utils package, so I believe it's an issue upstream. (@typescript-eslint/utils doesn't intend to have a TS requirement on end users.) I haven't revisited the issue since so it's possible that they've resolved the issue in a newer version, I'll try upgrading soon. If that doesn't work I'll send an issue or PR and hopefully we can get this sorted out 🙂

joshwilsonvu commented 2 years ago
"eslint-plugin-solid > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"

Okay, there's a peer dependency on typescript from tsutils, which isn't actually needed unless you set "comment": true in the parserOptions for @typescript-eslint/parser—an uncommon situation. It does seem to be unavoidable, it needs TypeScript APIs to parse the comments. That's no reason for my package to expose a peer dependency, but unless there's a way to silence the warning I'm going to close.