eslint-plugin-package-json 0.90.1 → 0.91.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.91.0](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.90.1...v0.91.0) (2026-03-13)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * add `valid-devEngines` rule ([#1663](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1663))
9
+
10
+ ### 🚀 Features
11
+
12
+ * add `require-cpu` rule ([#1659](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1659)) ([40ed2f6](https://github.com/michaelfaith/eslint-plugin-package-json/commit/40ed2f6a97040bcf5d516bcf1ac3e1a3a580c5ee))
13
+ * add `valid-devEngines` rule ([#1663](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1663)) ([7325be2](https://github.com/michaelfaith/eslint-plugin-package-json/commit/7325be2c6d3bc77467e8da7019ac24861261e27a))
14
+ * add require-module rule ([#1656](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1656)) ([557254c](https://github.com/michaelfaith/eslint-plugin-package-json/commit/557254cac267d1f37fe019662f8293d123aa0e60))
15
+
16
+
17
+ ### 🩹 Bug Fixes
18
+
19
+ * **valid-publishConfig:** rule not reporting violations for deeply nested objects ([#1662](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1662)) ([4c78698](https://github.com/michaelfaith/eslint-plugin-package-json/commit/4c786980b3efc2c25bc9a767a826ec43c3912c2e))
20
+
3
21
  ## [0.90.1](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.90.0...v0.90.1) (2026-03-10)
4
22
 
5
23
 
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  <p align="center">
9
9
  <!-- prettier-ignore-start -->
10
10
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
11
- <a href="#contributors" target="_blank"><img alt="👪 All Contributors: 39" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-39-21bb42.svg" /></a>
11
+ <a href="#contributors" target="_blank"><img alt="👪 All Contributors: 40" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-40-21bb42.svg" /></a>
12
12
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
13
13
  <!-- prettier-ignore-end -->
14
14
  <a href="https://github.com/michaelfaith/eslint-plugin-package-json/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
@@ -221,6 +221,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
221
221
  | [require-bugs](docs/rules/require-bugs.md) | Requires the `bugs` property to be present. | | | | |
222
222
  | [require-bundleDependencies](docs/rules/require-bundleDependencies.md) | Requires the `bundleDependencies` property to be present. | | | | |
223
223
  | [require-contributors](docs/rules/require-contributors.md) | Requires the `contributors` property to be present. | | | | |
224
+ | [require-cpu](docs/rules/require-cpu.md) | Requires the `cpu` property to be present. | | | | |
224
225
  | [require-dependencies](docs/rules/require-dependencies.md) | Requires the `dependencies` property to be present. | | | | |
225
226
  | [require-description](docs/rules/require-description.md) | Requires the `description` property to be present. | ✔️ ✅ 📦 | | | |
226
227
  | [require-devDependencies](docs/rules/require-devDependencies.md) | Requires the `devDependencies` property to be present. | | | | |
@@ -235,6 +236,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
235
236
  | [require-license](docs/rules/require-license.md) | Requires the `license` property to be present. | ✔️ ✅ 📦 | | | |
236
237
  | [require-main](docs/rules/require-main.md) | Requires the `main` property to be present. | | | | |
237
238
  | [require-man](docs/rules/require-man.md) | Requires the `man` property to be present. | | | | |
239
+ | [require-module](docs/rules/require-module.md) | Requires the `module` property to be present. | | | | |
238
240
  | [require-name](docs/rules/require-name.md) | Requires the `name` property to be present. | ✔️ ✅ 📦 | | | |
239
241
  | [require-optionalDependencies](docs/rules/require-optionalDependencies.md) | Requires the `optionalDependencies` property to be present. | | | | |
240
242
  | [require-os](docs/rules/require-os.md) | Requires the `os` property to be present. | | | | |
@@ -264,6 +266,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
264
266
  | [valid-dependencies](docs/rules/valid-dependencies.md) | Enforce that the `dependencies` property is valid. | ✔️ ✅ 📦 | | | |
265
267
  | [valid-description](docs/rules/valid-description.md) | Enforce that the `description` property is valid. | ✔️ ✅ 📦 | | | |
266
268
  | [valid-devDependencies](docs/rules/valid-devDependencies.md) | Enforce that the `devDependencies` property is valid. | ✔️ ✅ 📦 | | | |
269
+ | [valid-devEngines](docs/rules/valid-devEngines.md) | Enforce that the `devEngines` property is valid. | ✔️ ✅ 📦 | | | |
267
270
  | [valid-directories](docs/rules/valid-directories.md) | Enforce that the `directories` property is valid. | ✔️ ✅ 📦 | | | |
268
271
  | [valid-engines](docs/rules/valid-engines.md) | Enforce that the `engines` property is valid. | ✔️ ✅ 📦 | | | |
269
272
  | [valid-exports](docs/rules/valid-exports.md) | Enforce that the `exports` property is valid. | ✔️ ✅ 📦 | | | |
@@ -369,12 +372,13 @@ Thanks! 🗂
369
372
  <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>
370
373
  <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>
371
374
  <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>
375
+ <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>
372
376
  <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>
373
377
  <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>
374
378
  <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>
375
- <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>
376
379
  </tr>
377
380
  <tr>
381
+ <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>
378
382
  <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>
379
383
  <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>
380
384
  <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>
@@ -6,6 +6,7 @@ const propertyConfig = [
6
6
  ["bugs", { ignorePrivateDefault: true }],
7
7
  ["bundleDependencies"],
8
8
  ["contributors"],
9
+ ["cpu"],
9
10
  ["dependencies"],
10
11
  ["description", { isRecommended: true }],
11
12
  ["devDependencies"],
@@ -29,6 +30,7 @@ const propertyConfig = [
29
30
  }],
30
31
  ["main"],
31
32
  ["man"],
33
+ ["module"],
32
34
  ["name", {
33
35
  ignorePrivateDefault: true,
34
36
  isRecommended: true
@@ -1,5 +1,5 @@
1
1
  import { createSimpleValidPropertyRule } from "../utils/createSimpleValidPropertyRule.mjs";
2
- import { validateAuthor, validateBin, validateBugs, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDirectories, validateEngines, validateExports, validateFiles, validateFunding, validateHomepage, validateKeywords, validateLicense, validateMain, validateMan, validateOs, validatePackageManager, validatePrivate, validatePublishConfig, validateRepository, validateScripts, validateSideEffects, validateType, validateWorkspaces } from "package-json-validator";
2
+ import { validateAuthor, validateBin, validateBugs, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDevEngines, validateDirectories, validateEngines, validateExports, validateFiles, validateFunding, validateHomepage, validateKeywords, validateLicense, validateMain, validateMan, validateOs, validatePackageManager, validatePrivate, validatePublishConfig, validateRepository, validateScripts, validateSideEffects, validateType, validateWorkspaces } from "package-json-validator";
3
3
  //#region src/rules/valid-properties.ts
4
4
  const properties = [
5
5
  ["author", validateAuthor],
@@ -15,6 +15,7 @@ const properties = [
15
15
  ["description", validateDescription],
16
16
  ["dependencies", validateDependencies],
17
17
  ["devDependencies", validateDependencies],
18
+ ["devEngines", validateDevEngines],
18
19
  ["directories", validateDirectories],
19
20
  ["engines", validateEngines],
20
21
  ["exports", validateExports],
@@ -22,7 +22,7 @@ const createSimpleValidPropertyRule = (propertyName, validationFunction, aliases
22
22
  const childrenWithIssues = result.childResults.filter((childResult) => childResult.errorMessages.length);
23
23
  if (node.type === "JSONObjectExpression" && childrenWithIssues.length) for (const childResult of childrenWithIssues) {
24
24
  const childNode = node.properties[childResult.index];
25
- reportIssues(childResult, childNode);
25
+ reportIssues(childResult, childNode.value);
26
26
  }
27
27
  else if (node.type === "JSONArrayExpression" && childrenWithIssues.length) for (const childResult of childrenWithIssues) {
28
28
  const childNode = node.elements[childResult.index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-package-json",
3
- "version": "0.90.1",
3
+ "version": "0.91.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": {
@@ -49,7 +49,7 @@
49
49
  "detect-indent": "^7.0.2",
50
50
  "detect-newline": "^4.0.1",
51
51
  "eslint-fix-utils": "~0.4.1",
52
- "package-json-validator": "^1.2.1",
52
+ "package-json-validator": "^1.3.1",
53
53
  "semver": "^7.7.3",
54
54
  "sort-object-keys": "^2.0.0",
55
55
  "sort-package-json": "^3.4.0",
@@ -74,7 +74,7 @@
74
74
  "eslint-plugin-n": "17.24.0",
75
75
  "eslint-plugin-node-dependencies": "2.2.0",
76
76
  "eslint-plugin-perfectionist": "5.6.0",
77
- "eslint-plugin-regexp": "3.0.0",
77
+ "eslint-plugin-regexp": "3.1.0",
78
78
  "eslint-plugin-unicorn": "63.0.0",
79
79
  "eslint-plugin-yml": "3.3.0",
80
80
  "husky": "9.1.7",
@@ -90,7 +90,7 @@
90
90
  "prettier-plugin-sh": "0.18.0",
91
91
  "tsdown": "0.21.0",
92
92
  "typescript": "5.9.3",
93
- "typescript-eslint": "8.56.0",
93
+ "typescript-eslint": "8.57.0",
94
94
  "vitest": "4.0.13"
95
95
  },
96
96
  "peerDependencies": {