eslint-plugin-package-json 0.53.0 → 0.55.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,11 +1,23 @@
1
1
  # Changelog
2
2
 
3
- # [0.53.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.52.1...v0.53.0) (2025-08-13)
3
+ # [0.55.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.54.0...v0.55.0) (2025-08-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * add no-redundant-files to recommended ([#1232](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1232)) ([2a52f87](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/2a52f8797bff236f88232d139e2a9526c24e4b4c)), closes [#1231](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1231)
4
9
 
10
+ # [0.54.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.53.0...v0.54.0) (2025-08-15)
11
+
12
+ ### Features
13
+
14
+ - **valid-exports:** add new rule for validating `exports` ([#1220](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1220)) ([2af10da](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/2af10dae3398832819c6dd37730ffef5ee3329b7)), closes [#1033](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1033)
15
+
16
+ # [0.53.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.52.1...v0.53.0) (2025-08-13)
5
17
 
6
18
  ### Features
7
19
 
8
- * add docs url to all rules ([#1218](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1218)) ([d456b13](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/d456b13d2c30e71d11294a315282859c66a4b1b7)), closes [#1217](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1217)
20
+ - add docs url to all rules ([#1218](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1218)) ([d456b13](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/d456b13d2c30e71d11294a315282859c66a4b1b7)), closes [#1217](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1217)
9
21
 
10
22
  ## [0.52.1](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.52.0...v0.52.1) (2025-08-07)
11
23
 
package/README.md CHANGED
@@ -156,7 +156,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
156
156
  | Name                         | Description | 💼 | 🔧 | 💡 | ❌ |
157
157
  | :------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ | :--- | :- | :- | :- |
158
158
  | [no-empty-fields](docs/rules/no-empty-fields.md) | Reports on unnecessary empty arrays and objects. | ✔️ ✅ | | 💡 | |
159
- | [no-redundant-files](docs/rules/no-redundant-files.md) | Prevents adding unnecessary / redundant files. | | | 💡 | |
159
+ | [no-redundant-files](docs/rules/no-redundant-files.md) | Prevents adding unnecessary / redundant files. | ✔️ ✅ | | 💡 | |
160
160
  | [order-properties](docs/rules/order-properties.md) | Package properties must be declared in standard order | ✔️ ✅ | 🔧 | | |
161
161
  | [repository-shorthand](docs/rules/repository-shorthand.md) | Enforce either object or shorthand declaration for repository. | ✔️ ✅ | 🔧 | | |
162
162
  | [require-author](docs/rules/require-author.md) | Requires the `author` property to be present. | | | | |
@@ -185,6 +185,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
185
185
  | [valid-dependencies](docs/rules/valid-dependencies.md) | Enforce that the `dependencies` property is valid. | ✔️ ✅ | | | |
186
186
  | [valid-description](docs/rules/valid-description.md) | Enforce that the `description` property is valid. | ✔️ ✅ | | | |
187
187
  | [valid-devDependencies](docs/rules/valid-devDependencies.md) | Enforce that the `devDependencies` property is valid. | ✔️ ✅ | | | |
188
+ | [valid-exports](docs/rules/valid-exports.md) | Enforce that the `exports` property is valid. | ✔️ ✅ | | | |
188
189
  | [valid-license](docs/rules/valid-license.md) | Enforce that the `license` property is valid. | ✔️ ✅ | | | |
189
190
  | [valid-local-dependency](docs/rules/valid-local-dependency.md) | Checks existence of local dependencies in the package.json | | | | ❌ |
190
191
  | [valid-name](docs/rules/valid-name.md) | Enforce that package names are valid npm package names | ✔️ ✅ | | | |
package/lib/index.js CHANGED
@@ -3,7 +3,6 @@ import { plugin } from "./plugin.js";
3
3
  //#region src/index.ts
4
4
  const rules = plugin.rules;
5
5
  const configs = plugin.configs;
6
- var src_default = plugin;
7
6
 
8
7
  //#endregion
9
- export { configs, src_default as default, rules };
8
+ export { configs, plugin as default, rules };
@@ -83,7 +83,7 @@ const rule = createRule({
83
83
  docs: {
84
84
  category: "Best Practices",
85
85
  description: "Prevents adding unnecessary / redundant files.",
86
- recommended: false
86
+ recommended: true
87
87
  },
88
88
  hasSuggestions: true,
89
89
  messages: {
@@ -1,5 +1,5 @@
1
1
  import { createSimpleValidPropertyRule } from "../utils/createSimpleValidPropertyRule.js";
2
- import { validateAuthor, validateBundleDependencies, validateConfig, validateCpu, validateDependencies, validateDescription, validateLicense, validateScripts, validateType } from "package-json-validator";
2
+ import { validateAuthor, validateBundleDependencies, validateConfig, validateCpu, validateDependencies, validateDescription, validateExports, validateLicense, validateScripts, validateType } from "package-json-validator";
3
3
 
4
4
  //#region src/rules/valid-properties.ts
5
5
  const properties = [
@@ -13,6 +13,7 @@ const properties = [
13
13
  ["dependencies", validateDependencies],
14
14
  ["description", validateDescription],
15
15
  ["devDependencies", validateDependencies],
16
+ ["exports", validateExports],
16
17
  ["license", validateLicense],
17
18
  ["optionalDependencies", validateDependencies],
18
19
  ["peerDependencies", validateDependencies],
@@ -5,4 +5,6 @@ declare module "estree" {
5
5
  interface NodeMap {
6
6
  JSONNode: JSONNode;
7
7
  }
8
- }
8
+ }
9
+ //#endregion
10
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-package-json",
3
- "version": "0.53.0",
3
+ "version": "0.55.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": {
@@ -49,7 +49,7 @@
49
49
  "detect-indent": "^7.0.1",
50
50
  "detect-newline": "^4.0.1",
51
51
  "eslint-fix-utils": "~0.4.0",
52
- "package-json-validator": "~0.27.0",
52
+ "package-json-validator": "~0.29.0",
53
53
  "semver": "^7.5.4",
54
54
  "sort-object-keys": "^1.1.3",
55
55
  "sort-package-json": "^3.3.0",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
60
- "@eslint/js": "9.32.0",
60
+ "@eslint/js": "9.33.0",
61
61
  "@release-it/conventional-changelog": "10.0.0",
62
62
  "@types/eslint-plugin-markdown": "2.0.2",
63
63
  "@types/estree": "1.0.7",
@@ -68,16 +68,15 @@
68
68
  "@vitest/coverage-v8": "3.2.0",
69
69
  "@vitest/eslint-plugin": "1.3.3",
70
70
  "console-fail-test": "0.5.0",
71
- "create-typescript-app": "2.46.1",
72
- "eslint": "9.32.0",
71
+ "eslint": "9.33.0",
73
72
  "eslint-doc-generator": "2.2.0",
74
73
  "eslint-plugin-eslint-plugin": "7.0.0",
75
- "eslint-plugin-jsdoc": "52.0.0",
74
+ "eslint-plugin-jsdoc": "54.1.0",
76
75
  "eslint-plugin-jsonc": "2.20.0",
77
76
  "eslint-plugin-markdown": "5.1.0",
78
77
  "eslint-plugin-n": "17.21.0",
79
78
  "eslint-plugin-perfectionist": "4.15.0",
80
- "eslint-plugin-regexp": "2.9.0",
79
+ "eslint-plugin-regexp": "2.10.0",
81
80
  "eslint-plugin-yml": "1.18.0",
82
81
  "husky": "9.1.7",
83
82
  "jiti": "2.5.0",
@@ -92,7 +91,7 @@
92
91
  "prettier-plugin-sh": "0.18.0",
93
92
  "release-it": "19.0.1",
94
93
  "sentences-per-line": "0.3.0",
95
- "tsdown": "0.13.3",
94
+ "tsdown": "0.14.0",
96
95
  "typescript": "5.9.2",
97
96
  "typescript-eslint": "8.39.0",
98
97
  "vitest": "3.2.0"