eslint-plugin-package-json 0.77.0 → 0.79.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.77.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.76.0...v0.77.0) (2025-11-15)
3
+ # [0.79.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.78.0...v0.79.0) (2025-11-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * deprecate `valid-package-definition` ([#1400](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1400)) ([dca815a](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/dca815ae441d7d0667fcd54933eee868197b31d7)), closes [#1399](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1399)
4
9
 
10
+ # [0.78.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.77.0...v0.78.0) (2025-11-15)
11
+
12
+ ### Features
13
+
14
+ - **valid-repository:** add new rule for validating `repository` ([#1393](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1393)) ([2b38e88](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/2b38e881f60d357f9f73ad7a1aff159682542c42)), closes [#838](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/838)
15
+
16
+ # [0.77.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.76.0...v0.77.0) (2025-11-15)
5
17
 
6
18
  ### Features
7
19
 
8
- * **unique-dependencies:** report cross-group duplicates ([#1398](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1398)) ([94b690e](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/94b690e1996ec271ba743225ccecf66691f97e01)), closes [#1007](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1007)
20
+ - **unique-dependencies:** report cross-group duplicates ([#1398](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1398)) ([94b690e](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/commit/94b690e1996ec271ba743225ccecf66691f97e01)), closes [#1007](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1007)
9
21
 
10
22
  # [0.76.0](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/compare/v0.75.0...v0.76.0) (2025-11-15)
11
23
 
package/README.md CHANGED
@@ -233,10 +233,11 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
233
233
  | [valid-name](docs/rules/valid-name.md) | Enforce that package names are valid npm package names | ✔️ ✅ | | | |
234
234
  | [valid-optionalDependencies](docs/rules/valid-optionalDependencies.md) | Enforce that the `optionalDependencies` property is valid. | ✔️ ✅ | | | |
235
235
  | [valid-os](docs/rules/valid-os.md) | Enforce that the `os` property is valid. | ✔️ ✅ | | | |
236
- | [valid-package-definition](docs/rules/valid-package-definition.md) | Enforce that package.json has all properties required by the npm spec | ✔️ ✅ | | | |
236
+ | [valid-package-definition](docs/rules/valid-package-definition.md) | Enforce that package.json has all properties required by the npm spec | | | ||
237
237
  | [valid-peerDependencies](docs/rules/valid-peerDependencies.md) | Enforce that the `peerDependencies` property is valid. | ✔️ ✅ | | | |
238
238
  | [valid-private](docs/rules/valid-private.md) | Enforce that the `private` property is valid. | ✔️ ✅ | | | |
239
239
  | [valid-publishConfig](docs/rules/valid-publishConfig.md) | Enforce that the `publishConfig` property is valid. | ✔️ ✅ | | | |
240
+ | [valid-repository](docs/rules/valid-repository.md) | Enforce that the `repository` property is valid. | ✔️ ✅ | | | |
240
241
  | [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 | ✔️ ✅ | | 💡 | |
241
242
  | [valid-scripts](docs/rules/valid-scripts.md) | Enforce that the `scripts` property is valid. | ✔️ ✅ | | | |
242
243
  | [valid-type](docs/rules/valid-type.md) | Enforce that the `type` property is valid. | ✔️ ✅ | | | |
package/lib/index.d.mts CHANGED
@@ -10,9 +10,7 @@ declare const configs: {
10
10
  "legacy-recommended": {
11
11
  plugins: string[];
12
12
  rules: {
13
- "package-json/valid-package-definition": ["error", {
14
- ignoreProperties: string[];
15
- }];
13
+ [k: string]: "error";
16
14
  };
17
15
  };
18
16
  recommended: {
@@ -25,9 +23,7 @@ declare const configs: {
25
23
  readonly "package-json": eslint0.ESLint.Plugin;
26
24
  };
27
25
  rules: {
28
- "package-json/valid-package-definition": ["error", {
29
- ignoreProperties: string[];
30
- }];
26
+ [k: string]: "error";
31
27
  };
32
28
  };
33
29
  stylistic: {
package/lib/plugin.d.mts CHANGED
@@ -10,9 +10,7 @@ declare const plugin: {
10
10
  "legacy-recommended": {
11
11
  plugins: string[];
12
12
  rules: {
13
- "package-json/valid-package-definition": ["error", {
14
- ignoreProperties: string[];
15
- }];
13
+ [k: string]: "error";
16
14
  };
17
15
  };
18
16
  recommended: {
@@ -25,9 +23,7 @@ declare const plugin: {
25
23
  readonly "package-json": ESLint.Plugin;
26
24
  };
27
25
  rules: {
28
- "package-json/valid-package-definition": ["error", {
29
- ignoreProperties: string[];
30
- }];
26
+ [k: string]: "error";
31
27
  };
32
28
  };
33
29
  stylistic: {
package/lib/plugin.mjs CHANGED
@@ -43,11 +43,7 @@ const rules$2 = {
43
43
  "valid-repository-directory": rule$15,
44
44
  "valid-version": rule$16
45
45
  };
46
- const baseRecommendedRules = { ...Object.fromEntries(Object.entries(rules$2).filter(([, rule$17]) => rule$17.meta.docs?.recommended).map(([name$1]) => ["package-json/" + name$1, "error"])) };
47
- const recommendedRules = {
48
- ...baseRecommendedRules,
49
- "package-json/valid-package-definition": ["error", { ignoreProperties: Object.entries(baseRecommendedRules).filter(([name$1]) => name$1.startsWith("package-json/valid-") && name$1 !== "package-json/valid-package-definition").map(([name$1]) => name$1.replace("package-json/valid-", "")) }]
50
- };
46
+ const recommendedRules = { ...Object.fromEntries(Object.entries(rules$2).filter(([, rule$17]) => rule$17.meta.docs?.recommended).map(([name$1]) => ["package-json/" + name$1, "error"])) };
51
47
  const stylisticRules = { ...Object.fromEntries(Object.entries(rules$2).filter(([, rule$17]) => rule$17.meta.docs?.category === "Stylistic").map(([name$1]) => ["package-json/" + name$1, "error"])) };
52
48
  const plugin = {
53
49
  configs: {
@@ -23,10 +23,10 @@ const rule = createRule({
23
23
  },
24
24
  meta: {
25
25
  defaultOptions: [{ ignoreProperties: [] }],
26
+ deprecated: true,
26
27
  docs: {
27
28
  category: "Best Practices",
28
- description: "Enforce that package.json has all properties required by the npm spec",
29
- recommended: true
29
+ description: "Enforce that package.json has all properties required by the npm spec"
30
30
  },
31
31
  schema: [{
32
32
  additionalProperties: false,
@@ -1,5 +1,5 @@
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, validateScripts, validateType, validateWorkspaces } from "package-json-validator";
2
+ import { validateAuthor, validateBin, validateBundleDependencies, validateConfig, validateContributors, validateCpu, validateDependencies, validateDescription, validateDirectories, validateEngines, validateExports, validateFiles, validateHomepage, validateKeywords, validateLicense, validateMain, validateMan, validateOs, validatePrivate, validatePublishConfig, validateRepository, validateScripts, validateType, validateWorkspaces } from "package-json-validator";
3
3
 
4
4
  //#region src/rules/valid-properties.ts
5
5
  const properties = [
@@ -29,6 +29,7 @@ const properties = [
29
29
  ["peerDependencies", validateDependencies],
30
30
  ["private", validatePrivate],
31
31
  ["publishConfig", validatePublishConfig],
32
+ ["repository", validateRepository],
32
33
  ["scripts", validateScripts],
33
34
  ["type", validateType],
34
35
  ["workspaces", validateWorkspaces]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-package-json",
3
- "version": "0.77.0",
3
+ "version": "0.79.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": {