kellyselden / eslint-plugin-json-files

ESLint JSON processor and rules
MIT License
89 stars 7 forks source link

Add built-in PNPM support (workspace version protocol) #185

Open adbayb opened 6 days ago

adbayb commented 6 days ago

Description

In order to enforce local dependency resolution, PNPM offers the workspace:(*|^|~) protocol to resolve a local dependency version.

However, It seems the plugin does not provide built-in support for this (especially for the no-branch-dependencies and restrict-ranges rules). But, the plugin is flexible enough to provide escape hatches through verbose configuration (a good example is available here).

To allow a wider adoption and ease the consumer experience, It would be really great to consider PNPM also a first-class citizen to remove avoidable extra configurations consumer side (the workspace version protocol is also used on other package managers like yarn).

What do you think?

Implementation suggestion

Here're some thoughts on how it can be implemented:

kellyselden commented 6 days ago

Sounds good to me!