eslint-plugin-package-json 1.7.0 β†’ 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  <p align="center">
16
16
  <!-- prettier-ignore-start -->
17
17
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
18
- <a href="#contributors" target="_blank"><img alt="πŸ‘ͺ All Contributors: 43" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-43-21bb42.svg" /></a>
18
+ <a href="#contributors" target="_blank"><img alt="πŸ‘ͺ All Contributors: 44" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-44-21bb42.svg" /></a>
19
19
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
20
20
  <!-- prettier-ignore-end -->
21
21
  <a href="https://codecov.io/gh/michaelfaith/eslint-plugin-package-json" target="_blank"><img alt="πŸ§ͺ Coverage" src="https://img.shields.io/codecov/c/github/michaelfaith/eslint-plugin-package-json?label=%F0%9F%A7%AA%20coverage" /></a>
@@ -46,6 +46,7 @@ See [Getting Started](https://eslint-plugin-package-json.dev/getting-started) fo
46
46
  | [no-redundant-files](https://eslint-plugin-package-json.dev/rules/no-redundant-files) | Prevents adding unnecessary / redundant files. | βœ… | | πŸ’‘ |
47
47
  | [no-redundant-publishConfig](https://eslint-plugin-package-json.dev/rules/no-redundant-publishConfig) | Warns when publishConfig.access is used in unscoped packages. | βœ… | | πŸ’‘ |
48
48
  | [order-properties](https://eslint-plugin-package-json.dev/rules/order-properties) | Enforces that package properties are declared in a consistent order. | 🎨 | πŸ”§ | |
49
+ | [prefer-rolling-workspace-spec](https://eslint-plugin-package-json.dev/rules/prefer-rolling-workspace-spec) | Require that dependencies declared with workspace protocol use a rolling workspace spec instead of a specific semver range. | | | πŸ’‘ |
49
50
  | [repository-shorthand](https://eslint-plugin-package-json.dev/rules/repository-shorthand) | Enforce either object or shorthand declaration for repository. | βœ… | πŸ”§ | |
50
51
  | [require-attribution](https://eslint-plugin-package-json.dev/rules/require-attribution) | Ensures that proper attribution is included, requiring that either `author` or `contributors` is defined, and that if `contributors` is present, it should include at least one contributor. | βœ… | | πŸ’‘ |
51
52
  | [restrict-dependency-ranges](https://eslint-plugin-package-json.dev/rules/restrict-dependency-ranges) | Restricts the range of dependencies to allow or disallow specific types of ranges. | | | πŸ’‘ |
@@ -202,47 +203,48 @@ Thanks! 🍻
202
203
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/ClementValot"><img src="https://avatars.githubusercontent.com/u/65364056?v=4?s=100" width="100px;" alt="ClΓ©ment Valot"/><br /><sub><b>ClΓ©ment Valot</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3AClementValot" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=ClementValot" title="Code">πŸ’»</a></td>
203
204
  <td align="center" valign="top" width="14.28%"><a href="http://www.curtisjewell.dev/"><img src="https://avatars.githubusercontent.com/u/67483?v=4?s=100" width="100px;" alt="Curtis Jewell"/><br /><sub><b>Curtis Jewell</b></sub></a><br /><a href="#ideas-csjewell" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
204
205
  <td align="center" valign="top" width="14.28%"><a href="https://davidlj95.com"><img src="https://avatars.githubusercontent.com/u/8050648?v=4?s=100" width="100px;" alt="David LJ"/><br /><sub><b>David LJ</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=davidlj95" title="Documentation">πŸ“–</a></td>
206
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/DetachHead"><img src="https://avatars.githubusercontent.com/u/57028336?v=4?s=100" width="100px;" alt="DetachHead"/><br /><sub><b>DetachHead</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=DetachHead" title="Code">πŸ’»</a> <a href="#ideas-DetachHead" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
205
207
  <td align="center" valign="top" width="14.28%"><a href="http://lishaduck.github.io"><img src="https://avatars.githubusercontent.com/u/88557639?v=4?s=100" width="100px;" alt="Eli"/><br /><sub><b>Eli</b></sub></a><br /><a href="#ideas-lishaduck" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Alishaduck" title="Bug reports">πŸ›</a></td>
206
208
  <td align="center" valign="top" width="14.28%"><a href="https://open-fixture-library.org"><img src="https://avatars.githubusercontent.com/u/202916?v=4?s=100" width="100px;" alt="Flo Edelmann"/><br /><sub><b>Flo Edelmann</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=FloEdelmann" title="Documentation">πŸ“–</a></td>
207
- <td align="center" valign="top" width="14.28%"><a href="http://heggria.site"><img src="https://avatars.githubusercontent.com/u/34475327?v=4?s=100" width="100px;" alt="Heggria"/><br /><sub><b>Heggria</b></sub></a><br /><a href="#ideas-heggria" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
208
209
  </tr>
209
210
  <tr>
211
+ <td align="center" valign="top" width="14.28%"><a href="http://heggria.site"><img src="https://avatars.githubusercontent.com/u/34475327?v=4?s=100" width="100px;" alt="Heggria"/><br /><sub><b>Heggria</b></sub></a><br /><a href="#ideas-heggria" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
210
212
  <td align="center" valign="top" width="14.28%"><a href="https://hirok.io"><img src="https://avatars.githubusercontent.com/u/1075694?v=4?s=100" width="100px;" alt="Hiroki Osame"/><br /><sub><b>Hiroki Osame</b></sub></a><br /><a href="#ideas-privatenumber" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=privatenumber" title="Code">πŸ’»</a></td>
211
213
  <td align="center" valign="top" width="14.28%"><a href="https://vanyauhalin.me/"><img src="https://avatars.githubusercontent.com/u/56481109?v=4?s=100" width="100px;" alt="Ivan Uhalin"/><br /><sub><b>Ivan Uhalin</b></sub></a><br /><a href="#ideas-vanyauhalin" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
212
214
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Zamiell"><img src="https://avatars.githubusercontent.com/u/5511220?v=4?s=100" width="100px;" alt="James"/><br /><sub><b>James</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=Zamiell" title="Code">πŸ’»</a> <a href="#ideas-Zamiell" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3AZamiell" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=Zamiell" title="Documentation">πŸ“–</a></td>
213
215
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/zetlen"><img src="https://avatars.githubusercontent.com/u/1643758?v=4?s=100" width="100px;" alt="James Zetlen"/><br /><sub><b>James Zetlen</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=zetlen" title="Code">πŸ’»</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Azetlen" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=zetlen" title="Documentation">πŸ“–</a> <a href="#infra-zetlen" title="Infrastructure (Hosting, Build-Tools, etc)">πŸš‡</a> <a href="#maintenance-zetlen" title="Maintenance">🚧</a> <a href="#tool-zetlen" title="Tools">πŸ”§</a></td>
214
216
  <td align="center" valign="top" width="14.28%"><a href="https://piranna.github.io/"><img src="https://avatars.githubusercontent.com/u/532414?v=4?s=100" width="100px;" alt="JesΓΊs LeganΓ©s-Combarro"/><br /><sub><b>JesΓΊs LeganΓ©s-Combarro</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=piranna" title="Code">πŸ’»</a></td>
215
217
  <td align="center" valign="top" width="14.28%"><a href="http://www.joshuakgoldberg.com/"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg ✨"/><br /><sub><b>Josh Goldberg ✨</b></sub></a><br /><a href="#tool-JoshuaKGoldberg" title="Tools">πŸ”§</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3AJoshuaKGoldberg" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=JoshuaKGoldberg" title="Code">πŸ’»</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">πŸš‡</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=JoshuaKGoldberg" title="Documentation">πŸ“–</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#content-JoshuaKGoldberg" title="Content">πŸ–‹</a> <a href="#projectManagement-JoshuaKGoldberg" title="Project Management">πŸ“†</a></td>
216
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kendallgassner"><img src="https://avatars.githubusercontent.com/u/15275462?v=4?s=100" width="100px;" alt="Kendall Gassner"/><br /><sub><b>Kendall Gassner</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=kendallgassner" title="Code">πŸ’»</a> <a href="#maintenance-kendallgassner" title="Maintenance">🚧</a></td>
217
218
  </tr>
218
219
  <tr>
220
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/kendallgassner"><img src="https://avatars.githubusercontent.com/u/15275462?v=4?s=100" width="100px;" alt="Kendall Gassner"/><br /><sub><b>Kendall Gassner</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=kendallgassner" title="Code">πŸ’»</a> <a href="#maintenance-kendallgassner" title="Maintenance">🚧</a></td>
219
221
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/KristjanESPERANTO"><img src="https://avatars.githubusercontent.com/u/35647502?v=4?s=100" width="100px;" alt="Kristjan ESPERANTO"/><br /><sub><b>Kristjan ESPERANTO</b></sub></a><br /><a href="#ideas-kristjanesperanto" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Akristjanesperanto" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=kristjanesperanto" title="Code">πŸ’»</a></td>
220
222
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/marcalexiei"><img src="https://avatars.githubusercontent.com/u/24919330?v=4?s=100" width="100px;" alt="Marco Pasqualetti"/><br /><sub><b>Marco Pasqualetti</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=marcalexiei" title="Code">πŸ’»</a> <a href="#tool-marcalexiei" title="Tools">πŸ”§</a> <a href="#maintenance-marcalexiei" title="Maintenance">🚧</a></td>
221
223
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/lo1tuma"><img src="https://avatars.githubusercontent.com/u/169170?v=4?s=100" width="100px;" alt="Mathias Schreck"/><br /><sub><b>Mathias Schreck</b></sub></a><br /><a href="#ideas-lo1tuma" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
222
224
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Cellule"><img src="https://avatars.githubusercontent.com/u/4157103?v=4?s=100" width="100px;" alt="Michael "Mike" Ferris"/><br /><sub><b>Michael "Mike" Ferris</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=cellule" title="Code">πŸ’»</a></td>
223
225
  <td align="center" valign="top" width="14.28%"><a href="https://morrisoncole.co.uk"><img src="https://avatars.githubusercontent.com/u/963368?v=4?s=100" width="100px;" alt="Morrison Cole"/><br /><sub><b>Morrison Cole</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3AMorrisonCole" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=MorrisonCole" title="Documentation">πŸ“–</a></td>
224
226
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/nschonni"><img src="https://avatars.githubusercontent.com/u/1297909?v=4?s=100" width="100px;" alt="Nick Schonning"/><br /><sub><b>Nick Schonning</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=nschonni" title="Code">πŸ’»</a></td>
225
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/OlivierZal"><img src="https://avatars.githubusercontent.com/u/88216225?v=4?s=100" width="100px;" alt="Olivier Zalmanski"/><br /><sub><b>Olivier Zalmanski</b></sub></a><br /><a href="#maintenance-olivierzal" title="Maintenance">🚧</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=olivierzal" title="Documentation">πŸ“–</a></td>
226
227
  </tr>
227
228
  <tr>
229
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/OlivierZal"><img src="https://avatars.githubusercontent.com/u/88216225?v=4?s=100" width="100px;" alt="Olivier Zalmanski"/><br /><sub><b>Olivier Zalmanski</b></sub></a><br /><a href="#maintenance-olivierzal" title="Maintenance">🚧</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=olivierzal" title="Documentation">πŸ“–</a></td>
228
230
  <td align="center" valign="top" width="14.28%"><a href="http://patrikcsak.com"><img src="https://avatars.githubusercontent.com/u/4766244?v=4?s=100" width="100px;" alt="Patrik Csak"/><br /><sub><b>Patrik Csak</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Apatrik-csak" title="Bug reports">πŸ›</a></td>
229
231
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/rakleed"><img src="https://avatars.githubusercontent.com/u/19418601?v=4?s=100" width="100px;" alt="Pavel"/><br /><sub><b>Pavel</b></sub></a><br /><a href="#ideas-rakleed" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#tool-rakleed" title="Tools">πŸ”§</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=rakleed" title="Documentation">πŸ“–</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=rakleed" title="Code">πŸ’»</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Arakleed" title="Bug reports">πŸ›</a></td>
230
232
  <td align="center" valign="top" width="14.28%"><a href="https://sasial.dev"><img src="https://avatars.githubusercontent.com/u/44125644?v=4?s=100" width="100px;" alt="Sasial"/><br /><sub><b>Sasial</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=sasial-dev" title="Code">πŸ’»</a></td>
231
233
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/belozer"><img src="https://avatars.githubusercontent.com/u/1655916?v=4?s=100" width="100px;" alt="Sergey Belozyorcev"/><br /><sub><b>Sergey Belozyorcev</b></sub></a><br /><a href="#ideas-belozer" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
232
234
  <td align="center" valign="top" width="14.28%"><a href="https://shayan-zamani.me"><img src="https://avatars.githubusercontent.com/u/81762186?v=4?s=100" width="100px;" alt="Shayan Zamani"/><br /><sub><b>Shayan Zamani</b></sub></a><br /><a href="#ideas-ShayanTheNerd" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=ShayanTheNerd" title="Documentation">πŸ“–</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=ShayanTheNerd" title="Code">πŸ’»</a></td>
233
235
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Sigmabrogz"><img src="https://avatars.githubusercontent.com/u/122412346?v=4?s=100" width="100px;" alt="Sigmabro"/><br /><sub><b>Sigmabro</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=Sigmabrogz" title="Code">πŸ’»</a></td>
234
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/sirugh"><img src="https://avatars.githubusercontent.com/u/1278869?v=4?s=100" width="100px;" alt="Stephen"/><br /><sub><b>Stephen</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=sirugh" title="Code">πŸ’»</a></td>
235
236
  </tr>
236
237
  <tr>
238
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/sirugh"><img src="https://avatars.githubusercontent.com/u/1278869?v=4?s=100" width="100px;" alt="Stephen"/><br /><sub><b>Stephen</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=sirugh" title="Code">πŸ’»</a></td>
237
239
  <td align="center" valign="top" width="14.28%"><a href="https://hyoban.cc"><img src="https://avatars.githubusercontent.com/u/38493346?v=4?s=100" width="100px;" alt="Stephen Zhou"/><br /><sub><b>Stephen Zhou</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Ahyoban" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=hyoban" title="Code">πŸ’»</a> <a href="#ideas-hyoban" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=hyoban" title="Documentation">πŸ“–</a></td>
238
240
  <td align="center" valign="top" width="14.28%"><a href="https://www.wesleytodd.com/"><img src="https://avatars.githubusercontent.com/u/1027776?v=4?s=100" width="100px;" alt="Wes Todd"/><br /><sub><b>Wes Todd</b></sub></a><br /><a href="#ideas-wesleytodd" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
239
241
  <td align="center" valign="top" width="14.28%"><a href="https://ota-meshi.github.io/"><img src="https://avatars.githubusercontent.com/u/16508807?v=4?s=100" width="100px;" alt="Yosuke Ota"/><br /><sub><b>Yosuke Ota</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Aota-meshi" title="Bug reports">πŸ›</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=ota-meshi" title="Code">πŸ’»</a></td>
240
242
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/b3rnhard"><img src="https://avatars.githubusercontent.com/u/10774404?v=4?s=100" width="100px;" alt="b3rnhard"/><br /><sub><b>b3rnhard</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Ab3rnhard" title="Bug reports">πŸ›</a></td>
241
243
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/chouchouji"><img src="https://avatars.githubusercontent.com/u/70570907?v=4?s=100" width="100px;" alt="chouchouji"/><br /><sub><b>chouchouji</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=chouchouji" title="Code">πŸ’»</a></td>
242
244
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/michaelfaith"><img src="https://avatars.githubusercontent.com/u/8071845?v=4?s=100" width="100px;" alt="michael faith"/><br /><sub><b>michael faith</b></sub></a><br /><a href="#infra-michaelfaith" title="Infrastructure (Hosting, Build-Tools, etc)">πŸš‡</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=michaelfaith" title="Code">πŸ’»</a> <a href="#maintenance-michaelfaith" title="Maintenance">🚧</a> <a href="#ideas-michaelfaith" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Amichaelfaith" title="Bug reports">πŸ›</a> <a href="#tool-michaelfaith" title="Tools">πŸ”§</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=michaelfaith" title="Documentation">πŸ“–</a> <a href="#projectManagement-michaelfaith" title="Project Management">πŸ“†</a></td>
243
- <td align="center" valign="top" width="14.28%"><a href="https://roottool.vercel.app"><img src="https://avatars.githubusercontent.com/u/11808736?v=4?s=100" width="100px;" alt="roottool"/><br /><sub><b>roottool</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=roottool" title="Code">πŸ’»</a></td>
244
245
  </tr>
245
246
  <tr>
247
+ <td align="center" valign="top" width="14.28%"><a href="https://roottool.vercel.app"><img src="https://avatars.githubusercontent.com/u/11808736?v=4?s=100" width="100px;" alt="roottool"/><br /><sub><b>roottool</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=roottool" title="Code">πŸ’»</a></td>
246
248
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/sunnytsang1998"><img src="https://avatars.githubusercontent.com/u/207208443?v=4?s=100" width="100px;" alt="sunnytsang1998"/><br /><sub><b>sunnytsang1998</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Asunnytsang1998" title="Bug reports">πŸ›</a></td>
247
249
  </tr>
248
250
  </tbody>
@@ -1,4 +1,4 @@
1
- import { t as plugin$1 } from "../plugin-Dzfp9IK7.mjs";
1
+ import { t as plugin$1 } from "../plugin-Ciw4gT9_.mjs";
2
2
  import { toCompatRule } from "eslint-json-compat-utils";
3
3
  //#region src/experimental/plugin.ts
4
4
  const language = "json/json";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as plugin } from "./plugin-Dzfp9IK7.mjs";
1
+ import { t as plugin } from "./plugin-Ciw4gT9_.mjs";
2
2
  //#region src/index.ts
3
3
  const rules = plugin.rules;
4
4
  const configs = plugin.configs;
@@ -6,8 +6,8 @@ import detectIndent from "detect-indent";
6
6
  import { detectNewlineGraceful } from "detect-newline";
7
7
  import sortObjectKeys from "sort-object-keys";
8
8
  import sortPackageJson, { sortOrder } from "sort-package-json";
9
- import { execFileSync } from "node:child_process";
10
9
  import semver from "semver";
10
+ import { execFileSync } from "node:child_process";
11
11
  import { validateAuthor, validateBin, validateBrowser, validateBugs, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDevEngines, validateDirectories, validateEngines, validateExports, validateFiles, validateFunding, validateGypfile, validateHomepage, validateKeywords, validateLibc, validateLicense, validateMain, validateMan, validateName, validateOs, validatePackageManager, validatePeerDependenciesMeta, validatePrivate, validatePublishConfig, validateRepository, validateScripts, validateSideEffects, validateType, validateVersion, validateWorkspaces } from "package-json-validator";
12
12
  import fs from "node:fs";
13
13
  import path from "node:path";
@@ -50,7 +50,7 @@ function createRule(rule) {
50
50
  }
51
51
  //#endregion
52
52
  //#region src/rules/bin-name-casing.ts
53
- const rule$18 = createRule({
53
+ const rule$19 = createRule({
54
54
  create(context) {
55
55
  return { "Program > JSONExpressionStatement > JSONObjectExpression > JSONProperty[key.value=bin]"(node) {
56
56
  if (node.value.type === "JSONObjectExpression") for (const property of node.value.properties) {
@@ -92,7 +92,7 @@ function isImplicitFormat(node) {
92
92
  if (node.type === "JSONLiteral") return true;
93
93
  return node.properties.every((property) => !isJSONStringLiteral(property.key) || !property.key.value.startsWith("."));
94
94
  }
95
- const rule$17 = createRule({
95
+ const rule$18 = createRule({
96
96
  create(context) {
97
97
  const [{ prefer = "explicit" } = {}] = context.options;
98
98
  function validateForExplicit(node) {
@@ -193,7 +193,7 @@ const getTopLevelProperty = (node) => {
193
193
  return n.type === "JSONProperty" ? n.key : void 0;
194
194
  };
195
195
  const defaultIgnoreProperties = ["files"];
196
- const rule$16 = createRule({
196
+ const rule$17 = createRule({
197
197
  create(context) {
198
198
  const ignoreProperties = new Set(context.options[0]?.ignoreProperties ?? defaultIgnoreProperties);
199
199
  return {
@@ -249,7 +249,7 @@ const getBundledDependencyNames = (value) => {
249
249
  if (value?.type === "JSONArrayExpression") for (const element of value.elements.filter(isNotNullish).filter(isJSONStringLiteral)) names.add(element.value);
250
250
  return names;
251
251
  };
252
- const rule$15 = createRule({
252
+ const rule$16 = createRule({
253
253
  create(context) {
254
254
  const ignorePrivate = context.options[0]?.ignorePrivate ?? true;
255
255
  let isPrivate = false;
@@ -320,7 +320,7 @@ const getCachedLocalFileRegex = (filename) => {
320
320
  return regex;
321
321
  }
322
322
  };
323
- const rule$14 = createRule({
323
+ const rule$15 = createRule({
324
324
  create(context) {
325
325
  const entryCache = {
326
326
  bin: [],
@@ -397,7 +397,7 @@ const rule$14 = createRule({
397
397
  });
398
398
  //#endregion
399
399
  //#region src/rules/no-redundant-publishConfig.ts
400
- const rule$13 = createRule({
400
+ const rule$14 = createRule({
401
401
  create(context) {
402
402
  let packageName;
403
403
  let publishConfigAccessProperty;
@@ -443,7 +443,7 @@ const rule$13 = createRule({
443
443
  });
444
444
  //#endregion
445
445
  //#region src/rules/order-properties.ts
446
- const rule$12 = createRule({
446
+ const rule$13 = createRule({
447
447
  create(context) {
448
448
  return { "Program:exit"() {
449
449
  const { ast, text } = context.sourceCode;
@@ -500,6 +500,73 @@ const rule$12 = createRule({
500
500
  name: "order-properties"
501
501
  });
502
502
  //#endregion
503
+ //#region src/rules/prefer-rolling-workspace-spec.ts
504
+ const rollingWorkspaceSpecRegex = /^workspace:[*^~]?$/;
505
+ const convertibleSpecRegex = /^(workspace:[~^])/;
506
+ const rule$12 = createRule({
507
+ create(context) {
508
+ const { ignoreDependencies = [], ignorePatterns = [] } = context.options[0] ?? {};
509
+ const ignoreRegexes = ignorePatterns.map((pattern) => new RegExp(pattern));
510
+ const isIgnored = (name) => ignoreDependencies.includes(name) || ignoreRegexes.some((regex) => regex.test(name));
511
+ return { "Program > JSONExpressionStatement > JSONObjectExpression > JSONProperty[key.type=JSONLiteral]:matches([key.value=dependencies], [key.value=devDependencies])"(node) {
512
+ if (node.value.type === "JSONObjectExpression") for (const property of node.value.properties) {
513
+ const key = property.key.value;
514
+ if (isIgnored(key)) continue;
515
+ const valueNode = property.value;
516
+ if (!isJSONStringLiteral(valueNode) || !valueNode.value.startsWith("workspace:")) continue;
517
+ const dependencySpec = valueNode.value;
518
+ if (!rollingWorkspaceSpecRegex.test(dependencySpec)) {
519
+ let conversion;
520
+ const convertibleMatch = convertibleSpecRegex.exec(dependencySpec);
521
+ const rawVersion = dependencySpec.replace("workspace:", "");
522
+ if (convertibleMatch) conversion = convertibleMatch[1];
523
+ else if (semver.parse(rawVersion)) conversion = "workspace:*";
524
+ context.report({
525
+ messageId: "nonRollingWorkspaceSpec",
526
+ node: valueNode,
527
+ suggest: conversion ? [{
528
+ fix: (fixer) => {
529
+ return fixer.replaceText(valueNode, JSON.stringify(conversion));
530
+ },
531
+ messageId: "convertToRolling"
532
+ }] : void 0
533
+ });
534
+ }
535
+ }
536
+ } };
537
+ },
538
+ meta: {
539
+ defaultOptions: [{}],
540
+ docs: {
541
+ category: "Best Practices",
542
+ description: "Require that dependencies declared with workspace protocol use a rolling workspace spec instead of a specific semver range."
543
+ },
544
+ hasSuggestions: true,
545
+ messages: {
546
+ convertToRolling: "Convert to rolling workspace spec",
547
+ nonRollingWorkspaceSpec: "Workspace spec should not include specific semver range. Use a rolling workspace spec instead."
548
+ },
549
+ schema: [{
550
+ additionalProperties: false,
551
+ properties: {
552
+ ignoreDependencies: {
553
+ items: { type: ["string"] },
554
+ type: ["array"],
555
+ description: "Specific dependencies to ignore."
556
+ },
557
+ ignorePatterns: {
558
+ items: { type: ["string"] },
559
+ type: ["array"],
560
+ description: "Regex patterns for dependency names to ignore."
561
+ }
562
+ },
563
+ type: "object"
564
+ }],
565
+ type: "suggestion"
566
+ },
567
+ name: "prefer-rolling-workspace-spec"
568
+ });
569
+ //#endregion
503
570
  //#region src/utils/findPropertyWithKeyValue.ts
504
571
  function findPropertyWithKeyValue(properties, value) {
505
572
  return properties.find((property) => property.key.type === "JSONLiteral" && property.key.value === value);
@@ -1734,7 +1801,9 @@ const packageManagerAwareValidateDependencies = (value) => {
1734
1801
  const result = detectPackageManager();
1735
1802
  if (result?.name === "pnpm") {
1736
1803
  const version = result.version;
1737
- if (!version || semver.gte(version, "11.1.0")) return validateDependencies(value, { allowNamedRegistries: true });
1804
+ const isValidSemver = !!semver.valid(version);
1805
+ const isValidRange = !!semver.validRange(version);
1806
+ if (!version || isValidSemver && semver.gte(version, "11.1.0") || isValidRange && semver.satisfies("11.1.0", version)) return validateDependencies(value, { allowNamedRegistries: true });
1738
1807
  }
1739
1808
  return validateDependencies(value);
1740
1809
  };
@@ -1862,13 +1931,14 @@ const rule = createRule({
1862
1931
  //#region src/plugin.ts
1863
1932
  const require = createRequire(import.meta.url);
1864
1933
  const rules = {
1865
- "bin-name-casing": rule$18,
1866
- "exports-subpaths-style": rule$17,
1867
- "no-empty-fields": rule$16,
1868
- "no-local-dependencies": rule$15,
1869
- "no-redundant-files": rule$14,
1870
- "no-redundant-publishConfig": rule$13,
1871
- "order-properties": rule$12,
1934
+ "bin-name-casing": rule$19,
1935
+ "exports-subpaths-style": rule$18,
1936
+ "no-empty-fields": rule$17,
1937
+ "no-local-dependencies": rule$16,
1938
+ "no-redundant-files": rule$15,
1939
+ "no-redundant-publishConfig": rule$14,
1940
+ "order-properties": rule$13,
1941
+ "prefer-rolling-workspace-spec": rule$12,
1872
1942
  "require-attribution": rule$10,
1873
1943
  ...rules$2,
1874
1944
  "repository-shorthand": rule$11,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-package-json",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Rules for consistent, readable, and valid package.json files. πŸ—‚οΈ",
5
5
  "homepage": "https://github.com/michaelfaith/eslint-plugin-package-json#readme",
6
6
  "bugs": {
@@ -73,22 +73,23 @@
73
73
  "@vitest/eslint-plugin": "1.6.20",
74
74
  "astro": "7.2.0",
75
75
  "astro-og-canvas": "0.13.0",
76
- "canvaskit-wasm": "0.41.1",
76
+ "canvaskit-wasm": "0.42.0",
77
77
  "console-fail-test": "0.6.0",
78
- "eslint": "10.8.0",
78
+ "eslint": "10.9.0",
79
79
  "eslint-doc-generator": "3.7.0",
80
80
  "eslint-plugin-eslint-plugin": "7.6.0",
81
- "eslint-plugin-jsdoc": "63.3.0",
81
+ "eslint-plugin-jsdoc": "64.2.0",
82
82
  "eslint-plugin-jsonc": "3.4.0",
83
- "eslint-plugin-n": "18.2.1",
83
+ "eslint-plugin-n": "18.3.0",
84
84
  "eslint-plugin-node-dependencies": "2.2.0",
85
85
  "eslint-plugin-perfectionist": "5.10.0",
86
- "eslint-plugin-regexp": "3.1.0",
86
+ "eslint-plugin-regexp": "3.2.0",
87
87
  "eslint-plugin-unicorn": "73.0.0",
88
88
  "eslint-plugin-yml": "3.8.0",
89
89
  "jiti": "2.7.0",
90
90
  "json-schema-to-ts": "3.1.1",
91
91
  "knip": "6.32.0",
92
+ "pkg-pr-new": "0.0.87",
92
93
  "prettier": "3.9.0",
93
94
  "prettier-plugin-curly": "0.4.1",
94
95
  "prettier-plugin-packagejson": "3.0.2",
@@ -99,7 +100,7 @@
99
100
  "starlight-auto-sidebar": "0.4.0",
100
101
  "tsdown": "0.22.2",
101
102
  "typescript": "npm:@typescript/typescript6@6.0.2",
102
- "typescript-eslint": "8.66.0",
103
+ "typescript-eslint": "8.68.0",
103
104
  "vitest": "4.1.8"
104
105
  },
105
106
  "peerDependencies": {