eslint-plugin-package-json 0.73.0 → 0.75.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 +16 -2
- package/README.md +4 -1
- package/lib/rules/valid-properties.mjs +5 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
# [0.
|
|
3
|
+
# [0.75.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.73.0...v0.75.0) (2025-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **valid-man:** add new rule for validating `man` ([#1392](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1392)) ([3f1ffc5](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/3f1ffc57a924c080892dd66bc5ce7a011ca70451)), closes [#832](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/832)
|
|
9
|
+
* **valid-publishConfig:** add new rule for validating `publishConfig` ([#1388](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1388)) ([6d1fab4](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/6d1fab4e4b6c59e7bcfc582ef75a0e07a5c8ea08)), closes [#841](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/841)
|
|
10
|
+
* **valid-workspaces:** add new rule for validating `workspaces` ([#1396](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1396)) ([2eeca42](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/2eeca42701a8636704e3d6b896cf3eec21531779)), closes [#843](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/843)
|
|
4
11
|
|
|
12
|
+
# [0.74.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.73.0...v0.74.0) (2025-11-14)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **valid-publishConfig:** add new rule for validating `publishConfig` ([#1388](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1388)) ([6d1fab4](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/6d1fab4e4b6c59e7bcfc582ef75a0e07a5c8ea08)), closes [#841](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/841)
|
|
17
|
+
|
|
18
|
+
# [0.73.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.72.0...v0.73.0) (2025-11-13)
|
|
5
19
|
|
|
6
20
|
### Features
|
|
7
21
|
|
|
8
|
-
|
|
22
|
+
- **order-properties:** lexicographically sort non-standard properties ([#1375](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1375)) ([f7c0d01](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/f7c0d019b91aab831f7506e213cc1176bd5dac75)), closes [#1374](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1374)
|
|
9
23
|
|
|
10
24
|
# [0.72.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.71.0...v0.72.0) (2025-11-13)
|
|
11
25
|
|
package/README.md
CHANGED
|
@@ -228,16 +228,19 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
|
|
|
228
228
|
| [valid-license](docs/rules/valid-license.md) | Enforce that the `license` property is valid. | ✔️ ✅ | | | |
|
|
229
229
|
| [valid-local-dependency](docs/rules/valid-local-dependency.md) | Checks existence of local dependencies in the package.json | | | | ❌ |
|
|
230
230
|
| [valid-main](docs/rules/valid-main.md) | Enforce that the `main` property is valid. | ✔️ ✅ | | | |
|
|
231
|
+
| [valid-man](docs/rules/valid-man.md) | Enforce that the `man` property is valid. | ✔️ ✅ | | | |
|
|
231
232
|
| [valid-name](docs/rules/valid-name.md) | Enforce that package names are valid npm package names | ✔️ ✅ | | | |
|
|
232
233
|
| [valid-optionalDependencies](docs/rules/valid-optionalDependencies.md) | Enforce that the `optionalDependencies` property is valid. | ✔️ ✅ | | | |
|
|
233
234
|
| [valid-os](docs/rules/valid-os.md) | Enforce that the `os` property is valid. | ✔️ ✅ | | | |
|
|
234
235
|
| [valid-package-definition](docs/rules/valid-package-definition.md) | Enforce that package.json has all properties required by the npm spec | ✔️ ✅ | | | |
|
|
235
236
|
| [valid-peerDependencies](docs/rules/valid-peerDependencies.md) | Enforce that the `peerDependencies` property is valid. | ✔️ ✅ | | | |
|
|
236
237
|
| [valid-private](docs/rules/valid-private.md) | Enforce that the `private` property is valid. | ✔️ ✅ | | | |
|
|
238
|
+
| [valid-publishConfig](docs/rules/valid-publishConfig.md) | Enforce that the `publishConfig` property is valid. | ✔️ ✅ | | | |
|
|
237
239
|
| [valid-repository-directory](docs/rules/valid-repository-directory.md) | Enforce that if repository directory is specified, it matches the path to the package.json file | ✔️ ✅ | | 💡 | |
|
|
238
240
|
| [valid-scripts](docs/rules/valid-scripts.md) | Enforce that the `scripts` property is valid. | ✔️ ✅ | | | |
|
|
239
241
|
| [valid-type](docs/rules/valid-type.md) | Enforce that the `type` property is valid. | ✔️ ✅ | | | |
|
|
240
242
|
| [valid-version](docs/rules/valid-version.md) | Enforce that package versions are valid semver specifiers | ✔️ ✅ | | | |
|
|
243
|
+
| [valid-workspaces](docs/rules/valid-workspaces.md) | Enforce that the `workspaces` property is valid. | ✔️ ✅ | | | |
|
|
241
244
|
|
|
242
245
|
<!-- end auto-generated rules list -->
|
|
243
246
|
<!-- prettier-ignore-end -->
|
|
@@ -284,7 +287,7 @@ Thanks! 🗂
|
|
|
284
287
|
<td align="center" valign="top" width="14.28%"><a href="http://technotes.khitrenovich.com/"><img src="https://avatars.githubusercontent.com/u/3424762?v=4?s=100" width="100px;" alt="Anton Khitrenovich"/><br /><sub><b>Anton Khitrenovich</b></sub></a><br /><a href="#ideas-khitrenovich" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
285
288
|
<td align="center" valign="top" width="14.28%"><a href="https://azat.io"><img src="https://avatars.githubusercontent.com/u/5698350?v=4?s=100" width="100px;" alt="Azat S."/><br /><sub><b>Azat S.</b></sub></a><br /><a href="#ideas-azat-io" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commits?author=azat-io" title="Code">💻</a></td>
|
|
286
289
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/anomiex"><img src="https://avatars.githubusercontent.com/u/1030580?v=4?s=100" width="100px;" alt="Brad Jorsch"/><br /><sub><b>Brad Jorsch</b></sub></a><br /><a href="#ideas-anomiex" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=author%3Aanomiex" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commits?author=anomiex" title="Code">💻</a></td>
|
|
287
|
-
<td align="center" valign="top" width="14.28%"><a href="https://christopher-buss.gitbook.io/portfolio"><img src="https://avatars.githubusercontent.com/u/32301681?v=4?s=100" width="100px;" alt="Christopher Buss"/><br /><sub><b>Christopher Buss</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=author%3Achristopher-buss" title="Bug reports">🐛</a> <a href="#ideas-christopher-buss" title="Ideas, Planning, & Feedback">🤔</a></td>
|
|
290
|
+
<td align="center" valign="top" width="14.28%"><a href="https://christopher-buss.gitbook.io/portfolio"><img src="https://avatars.githubusercontent.com/u/32301681?v=4?s=100" width="100px;" alt="Christopher Buss"/><br /><sub><b>Christopher Buss</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=author%3Achristopher-buss" title="Bug reports">🐛</a> <a href="#ideas-christopher-buss" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commits?author=christopher-buss" title="Code">💻</a></td>
|
|
288
291
|
</tr>
|
|
289
292
|
<tr>
|
|
290
293
|
<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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSimpleValidPropertyRule } from "../utils/createSimpleValidPropertyRule.mjs";
|
|
2
|
-
import { validateAuthor, validateBin, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDirectories, validateExports, validateFiles, validateHomepage, validateKeywords, validateLicense, validateMain, validateOs, validatePrivate, validateScripts, validateType } from "package-json-validator";
|
|
2
|
+
import { validateAuthor, validateBin, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDirectories, validateExports, validateFiles, validateHomepage, validateKeywords, validateLicense, validateMain, validateMan, validateOs, validatePrivate, validatePublishConfig, validateScripts, validateType, validateWorkspaces } from "package-json-validator";
|
|
3
3
|
|
|
4
4
|
//#region src/rules/valid-properties.ts
|
|
5
5
|
const properties = [
|
|
@@ -22,12 +22,15 @@ const properties = [
|
|
|
22
22
|
["keywords", validateKeywords],
|
|
23
23
|
["license", validateLicense],
|
|
24
24
|
["main", validateMain],
|
|
25
|
+
["man", validateMan],
|
|
25
26
|
["optionalDependencies", validateDependencies],
|
|
26
27
|
["os", validateOs],
|
|
27
28
|
["peerDependencies", validateDependencies],
|
|
28
29
|
["private", validatePrivate],
|
|
30
|
+
["publishConfig", validatePublishConfig],
|
|
29
31
|
["scripts", validateScripts],
|
|
30
|
-
["type", validateType]
|
|
32
|
+
["type", validateType],
|
|
33
|
+
["workspaces", validateWorkspaces]
|
|
31
34
|
];
|
|
32
35
|
/** All basic valid- flavor rules */
|
|
33
36
|
const rules = Object.fromEntries(properties.map(([propertyName, validationFunctionOrOptions]) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-package-json",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "Rules for consistent, readable, and valid package.json files. 🗂️",
|
|
5
5
|
"homepage": "https://github.com/JoshuaKGoldberg/eslint-plugin-package-json#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"jiti": "2.6.0",
|
|
91
91
|
"json-schema-to-ts": "3.1.1",
|
|
92
92
|
"jsonc-eslint-parser": "2.4.1",
|
|
93
|
-
"knip": "5.
|
|
93
|
+
"knip": "5.68.0",
|
|
94
94
|
"lint-staged": "16.2.0",
|
|
95
95
|
"markdownlint": "0.39.0",
|
|
96
96
|
"markdownlint-cli": "0.45.0",
|