eslint-plugin-package-json 0.89.4 → 0.90.1

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,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.90.1](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.90.0...v0.90.1) (2026-03-10)
4
+
5
+
6
+ ### 🚀 Features
7
+
8
+ * add `require-bin` rule ([#1652](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1652)) ([434e605](https://github.com/michaelfaith/eslint-plugin-package-json/commit/434e60523a067128e92baa8debf0362ef06c89c6))
9
+ * add `require-contributors` rule ([#1648](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1648)) ([4a666ea](https://github.com/michaelfaith/eslint-plugin-package-json/commit/4a666ea9487c4afcc9a0ca0e730d51368266c06a))
10
+ * add `require-devEngines` rule ([#1649](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1649)) ([608744c](https://github.com/michaelfaith/eslint-plugin-package-json/commit/608744c3cb29f2dd9808a91cfb99def404a9bdf2))
11
+ * add `require-directories` rule ([#1654](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1654)) ([91369d6](https://github.com/michaelfaith/eslint-plugin-package-json/commit/91369d614c72707eeb9f42d73e971645e3ab590f))
12
+ * add `require-funding` rule ([#1647](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1647)) ([d2405a1](https://github.com/michaelfaith/eslint-plugin-package-json/commit/d2405a1e6e05ef27bcca850ff5cc034c78c51780))
13
+ * add `require-man` rule ([#1653](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1653)) ([e1cdd8a](https://github.com/michaelfaith/eslint-plugin-package-json/commit/e1cdd8ae35e768772fba92e0188798ac4870099d))
14
+
15
+ ## [0.90.0](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.89.4...v0.90.0) (2026-03-10)
16
+
17
+
18
+ ### ⚠ BREAKING CHANGES
19
+
20
+ * add `valid-funding` rule ([#1643](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1643))
21
+ * add `valid-bugs` rule ([#1644](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1644))
22
+ * add `valid-packageManager` rule ([#1640](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1640))
23
+
24
+ ### 🚀 Features
25
+
26
+ * add `valid-bugs` rule ([#1644](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1644)) ([f981fa3](https://github.com/michaelfaith/eslint-plugin-package-json/commit/f981fa38ab4f1630c6db0933d859974d0a6ec0b3))
27
+ * add `valid-funding` rule ([#1643](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1643)) ([5b3c77d](https://github.com/michaelfaith/eslint-plugin-package-json/commit/5b3c77da9b8edcd659a1fd9b3e51d1e43803aa5e))
28
+ * add `valid-packageManager` rule ([#1640](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1640)) ([9a65480](https://github.com/michaelfaith/eslint-plugin-package-json/commit/9a65480cb55a4d03043916def549cfd7fc4b604b))
29
+
3
30
  ## [0.89.4](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.89.3...v0.89.4) (2026-03-07)
4
31
 
5
32
 
package/README.md CHANGED
@@ -217,18 +217,24 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
217
217
  | [repository-shorthand](docs/rules/repository-shorthand.md) | Enforce either object or shorthand declaration for repository. | ✔️ ✅ 📦 | 🔧 | | |
218
218
  | [require-attribution](docs/rules/require-attribution.md) | 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. | ✔️ ✅ 📦 | | 💡 | |
219
219
  | [require-author](docs/rules/require-author.md) | Requires the `author` property to be present. | | | | |
220
+ | [require-bin](docs/rules/require-bin.md) | Requires the `bin` property to be present. | | | | |
220
221
  | [require-bugs](docs/rules/require-bugs.md) | Requires the `bugs` property to be present. | | | | |
221
222
  | [require-bundleDependencies](docs/rules/require-bundleDependencies.md) | Requires the `bundleDependencies` property to be present. | | | | |
223
+ | [require-contributors](docs/rules/require-contributors.md) | Requires the `contributors` property to be present. | | | | |
222
224
  | [require-dependencies](docs/rules/require-dependencies.md) | Requires the `dependencies` property to be present. | | | | |
223
225
  | [require-description](docs/rules/require-description.md) | Requires the `description` property to be present. | ✔️ ✅ 📦 | | | |
224
226
  | [require-devDependencies](docs/rules/require-devDependencies.md) | Requires the `devDependencies` property to be present. | | | | |
227
+ | [require-devEngines](docs/rules/require-devEngines.md) | Requires the `devEngines` property to be present. | | | | |
228
+ | [require-directories](docs/rules/require-directories.md) | Requires the `directories` property to be present. | | | | |
225
229
  | [require-engines](docs/rules/require-engines.md) | Requires the `engines` property to be present. | | | | |
226
230
  | [require-exports](docs/rules/require-exports.md) | Requires the `exports` property to be present. | ✔️ ✅ 📦 | | | |
227
231
  | [require-files](docs/rules/require-files.md) | Requires the `files` property to be present. | ✔️ ✅ 📦 | | | |
232
+ | [require-funding](docs/rules/require-funding.md) | Requires the `funding` property to be present. | | | | |
228
233
  | [require-homepage](docs/rules/require-homepage.md) | Requires the `homepage` property to be present. | | | | |
229
234
  | [require-keywords](docs/rules/require-keywords.md) | Requires the `keywords` property to be present. | | | | |
230
235
  | [require-license](docs/rules/require-license.md) | Requires the `license` property to be present. | ✔️ ✅ 📦 | | | |
231
236
  | [require-main](docs/rules/require-main.md) | Requires the `main` property to be present. | | | | |
237
+ | [require-man](docs/rules/require-man.md) | Requires the `man` property to be present. | | | | |
232
238
  | [require-name](docs/rules/require-name.md) | Requires the `name` property to be present. | ✔️ ✅ 📦 | | | |
233
239
  | [require-optionalDependencies](docs/rules/require-optionalDependencies.md) | Requires the `optionalDependencies` property to be present. | | | | |
234
240
  | [require-os](docs/rules/require-os.md) | Requires the `os` property to be present. | | | | |
@@ -250,6 +256,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
250
256
  | [unique-dependencies](docs/rules/unique-dependencies.md) | Checks a dependency isn't specified more than once (i.e. in `dependencies` and `devDependencies`) | ✔️ ✅ 📦 | | 💡 | |
251
257
  | [valid-author](docs/rules/valid-author.md) | Enforce that the `author` property is valid. | ✔️ ✅ 📦 | | | |
252
258
  | [valid-bin](docs/rules/valid-bin.md) | Enforce that the `bin` property is valid. | ✔️ ✅ 📦 | | | |
259
+ | [valid-bugs](docs/rules/valid-bugs.md) | Enforce that the `bugs` property is valid. | ✔️ ✅ 📦 | | | |
253
260
  | [valid-bundleDependencies](docs/rules/valid-bundleDependencies.md) | Enforce that the `bundleDependencies` (also: `bundledDependencies`) property is valid. | ✔️ ✅ 📦 | | | |
254
261
  | [valid-config](docs/rules/valid-config.md) | Enforce that the `config` property is valid. | ✔️ ✅ 📦 | | | |
255
262
  | [valid-contributors](docs/rules/valid-contributors.md) | Enforce that the `contributors` property is valid. | ✔️ ✅ 📦 | | | |
@@ -261,6 +268,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
261
268
  | [valid-engines](docs/rules/valid-engines.md) | Enforce that the `engines` property is valid. | ✔️ ✅ 📦 | | | |
262
269
  | [valid-exports](docs/rules/valid-exports.md) | Enforce that the `exports` property is valid. | ✔️ ✅ 📦 | | | |
263
270
  | [valid-files](docs/rules/valid-files.md) | Enforce that the `files` property is valid. | ✔️ ✅ 📦 | | | |
271
+ | [valid-funding](docs/rules/valid-funding.md) | Enforce that the `funding` property is valid. | ✔️ ✅ 📦 | | | |
264
272
  | [valid-homepage](docs/rules/valid-homepage.md) | Enforce that the `homepage` property is valid. | ✔️ ✅ 📦 | | | |
265
273
  | [valid-keywords](docs/rules/valid-keywords.md) | Enforce that the `keywords` property is valid. | ✔️ ✅ 📦 | | | |
266
274
  | [valid-license](docs/rules/valid-license.md) | Enforce that the `license` property is valid. | ✔️ ✅ 📦 | | | |
@@ -271,6 +279,7 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
271
279
  | [valid-optionalDependencies](docs/rules/valid-optionalDependencies.md) | Enforce that the `optionalDependencies` property is valid. | ✔️ ✅ 📦 | | | |
272
280
  | [valid-os](docs/rules/valid-os.md) | Enforce that the `os` property is valid. | ✔️ ✅ 📦 | | | |
273
281
  | [valid-package-definition](docs/rules/valid-package-definition.md) | Enforce that package.json has all properties required by the npm spec | | | | ❌ |
282
+ | [valid-packageManager](docs/rules/valid-packageManager.md) | Enforce that the `packageManager` property is valid. | ✔️ ✅ 📦 | | | |
274
283
  | [valid-peerDependencies](docs/rules/valid-peerDependencies.md) | Enforce that the `peerDependencies` property is valid. | ✔️ ✅ 📦 | | | |
275
284
  | [valid-private](docs/rules/valid-private.md) | Enforce that the `private` property is valid. | ✔️ ✅ 📦 | | | |
276
285
  | [valid-publishConfig](docs/rules/valid-publishConfig.md) | Enforce that the `publishConfig` property is valid. | ✔️ ✅ 📦 | | | |
@@ -1,5 +1,4 @@
1
1
  import { isPackageJson } from "./utils/isPackageJson.mjs";
2
-
3
2
  //#region src/createRule.ts
4
3
  /**
5
4
  * Rule options type is inferred from the JSON schema by [json-schema-to-ts](https://www.npmjs.com/package/json-schema-to-ts).
@@ -20,6 +19,5 @@ function createRule(rule) {
20
19
  }
21
20
  };
22
21
  }
23
-
24
22
  //#endregion
25
- export { createRule };
23
+ export { createRule };
package/lib/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import { JSONSchema } from "./node_modules/.pnpm/json-schema-to-ts@3.1.1/node_mo
2
2
  import { PackageJsonPluginSettings, PackageJsonRuleModule } from "./createRule.mjs";
3
3
  import { plugin } from "./plugin.mjs";
4
4
  import * as jsonc_eslint_parser0 from "jsonc-eslint-parser";
5
- import * as eslint0 from "eslint";
5
+ import * as eslint from "eslint";
6
6
 
7
7
  //#region src/index.d.ts
8
8
  declare const rules: Record<string, PackageJsonRuleModule<unknown[], JSONSchema[]>>;
@@ -20,7 +20,7 @@ declare const configs: {
20
20
  };
21
21
  name: string;
22
22
  plugins: {
23
- readonly "package-json": eslint0.ESLint.Plugin;
23
+ readonly "package-json": eslint.ESLint.Plugin;
24
24
  };
25
25
  rules: {
26
26
  [k: string]: "error";
@@ -33,7 +33,7 @@ declare const configs: {
33
33
  };
34
34
  name: string;
35
35
  plugins: {
36
- readonly "package-json": eslint0.ESLint.Plugin;
36
+ readonly "package-json": eslint.ESLint.Plugin;
37
37
  };
38
38
  rules: {
39
39
  [x: string]: "error";
@@ -46,7 +46,7 @@ declare const configs: {
46
46
  };
47
47
  name: string;
48
48
  plugins: {
49
- readonly "package-json": eslint0.ESLint.Plugin;
49
+ readonly "package-json": eslint.ESLint.Plugin;
50
50
  };
51
51
  rules: {
52
52
  [k: string]: "error";
package/lib/index.mjs CHANGED
@@ -1,9 +1,7 @@
1
1
  import { plugin } from "./plugin.mjs";
2
-
3
2
  //#region src/index.ts
4
3
  const rules = plugin.rules;
5
4
  const configs = plugin.configs;
6
5
  var src_default = plugin;
7
-
8
6
  //#endregion
9
- export { configs, src_default as default, rules };
7
+ export { configs, src_default as default, rules };
package/lib/plugin.mjs CHANGED
@@ -20,7 +20,6 @@ import { rule as rule$16 } from "./rules/valid-repository-directory.mjs";
20
20
  import { rule as rule$17 } from "./rules/valid-version.mjs";
21
21
  import { createRequire } from "node:module";
22
22
  import * as parserJsonc from "jsonc-eslint-parser";
23
-
24
23
  //#region src/plugin.ts
25
24
  const require = createRequire(import.meta.url);
26
25
  const rules = {
@@ -92,6 +91,5 @@ const plugin = {
92
91
  },
93
92
  rules
94
93
  };
95
-
96
94
  //#endregion
97
- export { plugin };
95
+ export { plugin };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { kebabCase } from "change-case";
3
-
4
3
  //#region src/rules/bin-name-casing.ts
5
4
  const rule = createRule({
6
5
  create(context) {
@@ -38,6 +37,5 @@ const rule = createRule({
38
37
  },
39
38
  name: "bin-name-casing"
40
39
  });
41
-
42
40
  //#endregion
43
- export { rule };
41
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
-
4
3
  //#region src/rules/exports-subpaths-style.ts
5
4
  function isImplicitFormat(node) {
6
5
  if (node.type === "JSONLiteral") return true;
@@ -68,6 +67,5 @@ const rule = createRule({
68
67
  },
69
68
  name: "exports-subpaths-style"
70
69
  });
71
-
72
70
  //#endregion
73
- export { rule };
71
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { fixRemoveArrayElement, fixRemoveObjectProperty } from "eslint-fix-utils";
3
-
4
3
  //#region src/rules/no-empty-fields.ts
5
4
  const getDataAndMessageId = (node) => {
6
5
  switch (node.type) {
@@ -86,6 +85,5 @@ const rule = createRule({
86
85
  },
87
86
  name: "no-empty-fields"
88
87
  });
89
-
90
88
  //#endregion
91
- export { rule };
89
+ export { rule };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral, isNotNullish } from "../utils/predicates.mjs";
3
3
  import { fixRemoveArrayElement } from "eslint-fix-utils";
4
-
5
4
  //#region src/rules/no-redundant-files.ts
6
5
  const defaultFiles = [
7
6
  /^(\.\/)?LICEN(C|S)E(\.|$)/i,
@@ -97,6 +96,5 @@ const rule = createRule({
97
96
  },
98
97
  name: "no-redundant-files"
99
98
  });
100
-
101
99
  //#endregion
102
- export { rule };
100
+ export { rule };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
3
  import { fixRemoveObjectProperty } from "eslint-fix-utils";
4
-
5
4
  //#region src/rules/no-redundant-publishConfig.ts
6
5
  const rule = createRule({
7
6
  create(context) {
@@ -47,6 +46,5 @@ const rule = createRule({
47
46
  },
48
47
  name: "no-redundant-publishConfig"
49
48
  });
50
-
51
49
  //#endregion
52
- export { rule };
50
+ export { rule };
@@ -3,7 +3,6 @@ import detectIndent from "detect-indent";
3
3
  import { detectNewlineGraceful } from "detect-newline";
4
4
  import sortObjectKeys from "sort-object-keys";
5
5
  import { sortOrder } from "sort-package-json";
6
-
7
6
  //#region src/rules/order-properties.ts
8
7
  const standardOrderLegacy = [
9
8
  "name",
@@ -93,6 +92,5 @@ const rule = createRule({
93
92
  },
94
93
  name: "order-properties"
95
94
  });
96
-
97
95
  //#endregion
98
- export { rule };
96
+ export { rule };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
3
  import { findPropertyWithKeyValue } from "../utils/findPropertyWithKeyValue.mjs";
4
-
5
4
  //#region src/rules/repository-shorthand.ts
6
5
  const providerRegexes = {
7
6
  bitbucket: /^(?:git\+)?(?:ssh:\/\/git@|http?s:\/\/)?(?:www\.)?bitbucket\.org\//,
@@ -108,6 +107,5 @@ const rule = createRule({
108
107
  },
109
108
  name: "repository-shorthand"
110
109
  });
111
-
112
110
  //#endregion
113
- export { rule };
111
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { fixRemoveObjectProperty } from "eslint-fix-utils";
3
-
4
3
  //#region src/rules/require-attribution.ts
5
4
  const rule = createRule({
6
5
  create(context) {
@@ -82,6 +81,5 @@ const rule = createRule({
82
81
  },
83
82
  name: "require-attribution"
84
83
  });
85
-
86
84
  //#endregion
87
- export { rule };
85
+ export { rule };
@@ -1,13 +1,16 @@
1
1
  import { createSimpleRequirePropertyRule } from "../utils/createSimpleRequirePropertyRule.mjs";
2
-
3
2
  //#region src/rules/require-properties.ts
4
3
  const propertyConfig = [
5
4
  ["author"],
5
+ ["bin"],
6
6
  ["bugs", { ignorePrivateDefault: true }],
7
7
  ["bundleDependencies"],
8
+ ["contributors"],
8
9
  ["dependencies"],
9
10
  ["description", { isRecommended: true }],
10
11
  ["devDependencies"],
12
+ ["devEngines"],
13
+ ["directories"],
11
14
  ["engines"],
12
15
  ["exports", {
13
16
  ignorePrivateDefault: true,
@@ -17,6 +20,7 @@ const propertyConfig = [
17
20
  ignorePrivateDefault: true,
18
21
  isRecommended: true
19
22
  }],
23
+ ["funding"],
20
24
  ["homepage", { ignorePrivateDefault: true }],
21
25
  ["keywords", { ignorePrivateDefault: true }],
22
26
  ["license", {
@@ -24,6 +28,7 @@ const propertyConfig = [
24
28
  isRecommended: true
25
29
  }],
26
30
  ["main"],
31
+ ["man"],
27
32
  ["name", {
28
33
  ignorePrivateDefault: true,
29
34
  isRecommended: true
@@ -57,6 +62,5 @@ const rules = Object.fromEntries(propertyConfig.map(([propertyName, options]) =>
57
62
  const { rule, ruleName } = createSimpleRequirePropertyRule(propertyName, options);
58
63
  return [ruleName, rule];
59
64
  }));
60
-
61
65
  //#endregion
62
- export { propertyConfig, rules };
66
+ export { propertyConfig, rules };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
3
  import semver from "semver";
4
-
5
4
  //#region src/rules/restrict-dependency-ranges.ts
6
5
  const DEPENDENCY_TYPES = [
7
6
  "dependencies",
@@ -144,6 +143,5 @@ const rule = createRule({
144
143
  },
145
144
  name: "restrict-dependency-ranges"
146
145
  });
147
-
148
146
  //#endregion
149
- export { rule };
147
+ export { rule };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
3
  import { fixRemoveObjectProperty } from "eslint-fix-utils";
4
-
5
4
  //#region src/rules/restrict-private-properties.ts
6
5
  const defaultBlockedProperties = ["files", "publishConfig"];
7
6
  const rule = createRule({
@@ -50,6 +49,5 @@ const rule = createRule({
50
49
  },
51
50
  name: "restrict-private-properties"
52
51
  });
53
-
54
52
  //#endregion
55
- export { rule };
53
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { kebabCase } from "change-case";
3
-
4
3
  //#region src/rules/scripts-name-casing.ts
5
4
  const BUILT_IN_SCRIPTS_IN_CAMEL_CASE = new Set(["prepublishOnly"]);
6
5
  const rule = createRule({
@@ -41,6 +40,5 @@ const rule = createRule({
41
40
  },
42
41
  name: "scripts-name-casing"
43
42
  });
44
-
45
43
  //#endregion
46
- export { rule };
44
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import sortPackageJson from "sort-package-json";
3
-
4
3
  //#region src/rules/sort-collections.ts
5
4
  const defaultCollections = new Set([
6
5
  "config",
@@ -69,6 +68,5 @@ const rule = createRule({
69
68
  },
70
69
  name: "sort-collections"
71
70
  });
72
-
73
71
  //#endregion
74
- export { rule };
72
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "../utils/predicates.mjs";
3
-
4
3
  //#region src/rules/specify-peers-locally.ts
5
4
  const rule = createRule({
6
5
  create(context) {
@@ -60,6 +59,5 @@ const rule = createRule({
60
59
  },
61
60
  name: "specify-peers-locally"
62
61
  });
63
-
64
62
  //#endregion
65
- export { rule };
63
+ export { rule };
@@ -1,7 +1,6 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral, isNotNullish } from "../utils/predicates.mjs";
3
3
  import { fixRemoveArrayElement, fixRemoveObjectProperty } from "eslint-fix-utils";
4
-
5
4
  //#region src/rules/unique-dependencies.ts
6
5
  const dependencyPropertyNames = new Set([
7
6
  "bundledDependencies",
@@ -83,6 +82,5 @@ const rule = createRule({
83
82
  },
84
83
  name: "unique-dependencies"
85
84
  });
86
-
87
85
  //#endregion
88
- export { rule };
86
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import validate from "validate-npm-package-name";
3
-
4
3
  //#region src/rules/valid-name.ts
5
4
  const rule = createRule({
6
5
  create(context) {
@@ -39,6 +38,5 @@ const rule = createRule({
39
38
  },
40
39
  name: "valid-name"
41
40
  });
42
-
43
41
  //#endregion
44
- export { rule };
42
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { validate } from "package-json-validator";
3
-
4
3
  //#region src/rules/valid-package-definition.ts
5
4
  const ignoredErrors = [
6
5
  /^Url not valid/i,
@@ -41,6 +40,5 @@ const rule = createRule({
41
40
  },
42
41
  name: "valid-package-definition"
43
42
  });
44
-
45
43
  //#endregion
46
- export { rule };
44
+ export { rule };
@@ -1,10 +1,10 @@
1
1
  import { createSimpleValidPropertyRule } from "../utils/createSimpleValidPropertyRule.mjs";
2
- import { validateAuthor, validateBin, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDirectories, validateEngines, validateExports, validateFiles, validateHomepage, validateKeywords, validateLicense, validateMain, validateMan, validateOs, validatePrivate, validatePublishConfig, validateRepository, validateScripts, validateSideEffects, validateType, validateWorkspaces } from "package-json-validator";
3
-
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";
4
3
  //#region src/rules/valid-properties.ts
5
4
  const properties = [
6
5
  ["author", validateAuthor],
7
6
  ["bin", validateBin],
7
+ ["bugs", validateBugs],
8
8
  ["bundleDependencies", {
9
9
  aliases: ["bundledDependencies"],
10
10
  validator: validateBundleDependencies
@@ -19,6 +19,7 @@ const properties = [
19
19
  ["engines", validateEngines],
20
20
  ["exports", validateExports],
21
21
  ["files", validateFiles],
22
+ ["funding", validateFunding],
22
23
  ["homepage", validateHomepage],
23
24
  ["keywords", validateKeywords],
24
25
  ["license", validateLicense],
@@ -27,6 +28,7 @@ const properties = [
27
28
  ["module", validateMain],
28
29
  ["optionalDependencies", validateDependencies],
29
30
  ["os", validateOs],
31
+ ["packageManager", validatePackageManager],
30
32
  ["peerDependencies", validateDependencies],
31
33
  ["private", validatePrivate],
32
34
  ["publishConfig", validatePublishConfig],
@@ -47,6 +49,5 @@ const rules = Object.fromEntries(properties.map(([propertyName, validationFuncti
47
49
  const { rule, ruleName } = createSimpleValidPropertyRule(propertyName, validationFunction, aliases);
48
50
  return [ruleName, rule];
49
51
  }));
50
-
51
52
  //#endregion
52
- export { rules };
53
+ export { rules };
@@ -3,7 +3,6 @@ import { findPropertyWithKeyValue } from "../utils/findPropertyWithKeyValue.mjs"
3
3
  import { findRootSync } from "@altano/repository-tools";
4
4
  import path from "node:path";
5
5
  import { sep } from "node:path/posix";
6
-
7
6
  //#region src/rules/valid-repository-directory.ts
8
7
  /**
9
8
  * Checks if the child path appears at the end of the parent path.
@@ -66,6 +65,5 @@ const rule = createRule({
66
65
  },
67
66
  name: "valid-repository-directory"
68
67
  });
69
-
70
68
  //#endregion
71
- export { rule };
69
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import semver from "semver";
3
-
4
3
  //#region src/rules/valid-version.ts
5
4
  const rule = createRule({
6
5
  create(context) {
@@ -33,6 +32,5 @@ const rule = createRule({
33
32
  },
34
33
  name: "valid-version"
35
34
  });
36
-
37
35
  //#endregion
38
- export { rule };
36
+ export { rule };
@@ -1,6 +1,5 @@
1
1
  import { createRule } from "../createRule.mjs";
2
2
  import { isJSONStringLiteral } from "./predicates.mjs";
3
-
4
3
  //#region src/utils/createSimpleRequirePropertyRule.ts
5
4
  /**
6
5
  * Given a top-level property name, create a rule that requires that property to be present.
@@ -52,6 +51,5 @@ const createSimpleRequirePropertyRule = (propertyName, { category, fixValue, ign
52
51
  ruleName
53
52
  };
54
53
  };
55
-
56
54
  //#endregion
57
- export { createSimpleRequirePropertyRule };
55
+ export { createSimpleRequirePropertyRule };
@@ -1,5 +1,4 @@
1
1
  import { createRule } from "../createRule.mjs";
2
-
3
2
  //#region src/utils/createSimpleValidPropertyRule.ts
4
3
  /**
5
4
  * Given a top-level property name, and a validation function, create a rule that validates the property using the validation function.
@@ -53,6 +52,5 @@ const createSimpleValidPropertyRule = (propertyName, validationFunction, aliases
53
52
  ruleName
54
53
  };
55
54
  };
56
-
57
55
  //#endregion
58
- export { createSimpleValidPropertyRule };
56
+ export { createSimpleValidPropertyRule };
@@ -2,6 +2,5 @@
2
2
  function findPropertyWithKeyValue(properties, value) {
3
3
  return properties.find((property) => property.key.type === "JSONLiteral" && property.key.value === value);
4
4
  }
5
-
6
5
  //#endregion
7
- export { findPropertyWithKeyValue };
6
+ export { findPropertyWithKeyValue };
@@ -8,6 +8,5 @@ const formatErrors = (errors) => {
8
8
  if (errors.length === 0) return "";
9
9
  return errors.length > 1 ? ["", ...errors].join("\n - ") : errors[0];
10
10
  };
11
-
12
11
  //#endregion
13
- export { formatErrors };
12
+ export { formatErrors };
@@ -1,5 +1,4 @@
1
1
  //#region src/utils/isPackageJson.ts
2
2
  const isPackageJson = (filePath) => /(?:^|[/\\])package.json$/.test(filePath);
3
-
4
3
  //#endregion
5
- export { isPackageJson };
4
+ export { isPackageJson };
@@ -5,6 +5,5 @@ function isJSONStringLiteral(node) {
5
5
  function isNotNullish(value) {
6
6
  return value !== null && value !== void 0;
7
7
  }
8
-
9
8
  //#endregion
10
- export { isJSONStringLiteral, isNotNullish };
9
+ export { isJSONStringLiteral, isNotNullish };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-package-json",
3
- "version": "0.89.4",
3
+ "version": "0.90.1",
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.0.1",
52
+ "package-json-validator": "^1.2.1",
53
53
  "semver": "^7.7.3",
54
54
  "sort-object-keys": "^2.0.0",
55
55
  "sort-package-json": "^3.4.0",
@@ -60,19 +60,19 @@
60
60
  "@eslint/js": "10.0.1",
61
61
  "@eslint/markdown": "7.5.1",
62
62
  "@types/estree": "1.0.8",
63
- "@types/node": "24.11.0",
63
+ "@types/node": "24.12.0",
64
64
  "@types/semver": "7.7.1",
65
65
  "@types/validate-npm-package-name": "4.0.2",
66
66
  "@vitest/coverage-v8": "4.0.13",
67
67
  "@vitest/eslint-plugin": "1.6.1",
68
68
  "console-fail-test": "0.6.0",
69
69
  "eslint": "10.0.0",
70
- "eslint-doc-generator": "3.2.0",
70
+ "eslint-doc-generator": "3.3.1",
71
71
  "eslint-plugin-eslint-plugin": "7.3.1",
72
72
  "eslint-plugin-jsdoc": "62.7.0",
73
73
  "eslint-plugin-jsonc": "3.1.0",
74
74
  "eslint-plugin-n": "17.24.0",
75
- "eslint-plugin-node-dependencies": "2.1.0",
75
+ "eslint-plugin-node-dependencies": "2.2.0",
76
76
  "eslint-plugin-perfectionist": "5.6.0",
77
77
  "eslint-plugin-regexp": "3.0.0",
78
78
  "eslint-plugin-unicorn": "63.0.0",
@@ -81,14 +81,14 @@
81
81
  "jiti": "2.6.1",
82
82
  "json-schema-to-ts": "3.1.1",
83
83
  "jsonc-eslint-parser": "3.1.0",
84
- "knip": "5.85.0",
84
+ "knip": "5.86.0",
85
85
  "lint-staged": "16.3.0",
86
86
  "prettier": "3.8.0",
87
87
  "prettier-plugin-curly": "0.4.0",
88
88
  "prettier-plugin-packagejson": "3.0.0",
89
89
  "prettier-plugin-sentences-per-line": "0.2.3",
90
90
  "prettier-plugin-sh": "0.18.0",
91
- "tsdown": "0.20.0",
91
+ "tsdown": "0.21.0",
92
92
  "typescript": "5.9.3",
93
93
  "typescript-eslint": "8.56.0",
94
94
  "vitest": "4.0.13"