-
Notifications
You must be signed in to change notification settings - Fork 181
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
chore(eslint-plugin-sonarjs): add missing @typescript-eslint/parser dependency #4836
Conversation
Hello @rtritto , If I'm not mistaken, the It may be imported by one of the plugin's direct or indirect dependencies, though, but we can't know about that. The article that you mention makes a statement that is quite debatable and partially wrong:
If you follow this principle, it means that you have to add a dependency for every peer dependencies of your own dependencies, direct or indirect. This is not only practically impossible (it would mean for example that we have to add
This is not true, at least for npm, since version 7: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#peerdependencies
That yarn doesn't implement such a feature is a design choice of yarn's team. For the record, let me say that I believe On a side note, one of the consequences of |
With a plugin, you can usually have a peer dependency. Imply that when when you add that plugin as dependency you must also add the peer dependency as dependency or dev dependency or peer dependency. With any (updated) package manager, if you do a clean install of As source you can see the related packages:
Edit: Edit2: |
This is true only for package managers outside of
I'm intrigued. Can you please say more about this? We will close the PR itself: We think that |
|
Maybe I'm missing something: what problem do you actually encounter? Is the plugin not working correctly when installed using |
With
ESLint v9 uses flat configs as default (https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#flat-config-is-now-the-default-and-has-some-changes), so to improve (and reduce complexity) settings of |
For
eslint-plugin-sonarjs
, fix issue missing transitive peer dependency@typescript-eslint/parser
for@typescript-eslint/eslint-plugin
.After
eslint-plugin-sonarjs
is installed, withyarn explain peer-requirements
:There is an article written by author of yarn package manager: Implicit Transitive Peer Dependencies
Note
Please run
npm i --lockfile-version 3
to updatepackages\jsts\src\rules\package-lock.json