eslint-plugin-package-json 1.0.0 → 1.1.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 +7 -0
- package/README.md +1 -1
- package/lib/createRule.d.mts +2 -2
- package/lib/index.d.mts +7 -9
- package/lib/plugin.d.mts +4 -4
- package/lib/rules/require-properties.mjs +1 -0
- package/lib/types/estree.d.mts +1 -1
- package/lib/utils/createSimpleRequirePropertyRule.d.mts +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v1.0.0...v1.1.0) (2026-05-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🚀 Features
|
|
7
|
+
|
|
8
|
+
* add `require-peerDependenciesMeta` rule ([#1852](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1852)) ([e66ac55](https://github.com/michaelfaith/eslint-plugin-package-json/commit/e66ac55c64b5be4c829e67884611e335a34db70c))
|
|
9
|
+
|
|
3
10
|
## [1.0.0](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.91.2...v1.0.0) (2026-05-17)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
alt="Logo Image"
|
|
5
5
|
height="240"
|
|
6
6
|
/>
|
|
7
|
-
</>
|
|
8
7
|
|
|
9
8
|
<h1 align="center">ESLint Plugin: Package JSON</h1>
|
|
10
9
|
|
|
@@ -79,6 +78,7 @@ See [Getting Started](https://eslint-plugin-package-json.dev/getting-started) fo
|
|
|
79
78
|
| [require-os](https://eslint-plugin-package-json.dev/rules/require-properties/require-os) | Requires the `os` property to be present. | | | |
|
|
80
79
|
| [require-packageManager](https://eslint-plugin-package-json.dev/rules/require-properties/require-packageManager) | Requires the `packageManager` property to be present. | | | |
|
|
81
80
|
| [require-peerDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependencies) | Requires the `peerDependencies` property to be present. | | | |
|
|
81
|
+
| [require-peerDependenciesMeta](https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependenciesMeta) | Requires the `peerDependenciesMeta` property to be present. | | | |
|
|
82
82
|
| [require-private](https://eslint-plugin-package-json.dev/rules/require-properties/require-private) | Requires the `private` property to be present. | | 🔧 | |
|
|
83
83
|
| [require-publishConfig](https://eslint-plugin-package-json.dev/rules/require-properties/require-publishConfig) | Requires the `publishConfig` property to be present. | | | |
|
|
84
84
|
| [require-repository](https://eslint-plugin-package-json.dev/rules/require-properties/require-repository) | Requires the `repository` property to be present. | ✅ 📦 | | |
|
package/lib/createRule.d.mts
CHANGED
|
@@ -35,9 +35,9 @@ interface PackageJsonRuleContext<Options extends unknown[] = unknown[]> extends
|
|
|
35
35
|
}
|
|
36
36
|
interface PackageJsonRuleModule<Options extends unknown[] = unknown[], Schema extends JSONSchema[] = JSONSchema[]> {
|
|
37
37
|
create(context: PackageJsonRuleContext<Options>): RuleListener;
|
|
38
|
-
meta: Omit<Rule.RuleMetaData,
|
|
38
|
+
meta: Omit<Rule.RuleMetaData, 'defaultOptions' | 'docs' | 'schema'> & {
|
|
39
39
|
defaultOptions?: NoInfer<Options>;
|
|
40
|
-
docs?: Rule.RuleMetaData[
|
|
40
|
+
docs?: Rule.RuleMetaData['docs'] & {
|
|
41
41
|
category?: string; /** An optional route segment to group this rule under */
|
|
42
42
|
ruleGroup?: string;
|
|
43
43
|
};
|
package/lib/index.d.mts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { JSONSchema } from "./node_modules/.pnpm/json-schema-to-ts@3.1.1/node_modules/json-schema-to-ts/lib/types/definitions/jsonSchema.mjs";
|
|
2
2
|
import { PackageJsonPluginSettings, PackageJsonRuleModule } from "./createRule.mjs";
|
|
3
3
|
import { plugin } from "./plugin.mjs";
|
|
4
|
-
import * as _$jsonc_eslint_parser0 from "jsonc-eslint-parser";
|
|
5
|
-
import * as _$eslint from "eslint";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
8
6
|
declare const rules: Record<string, PackageJsonRuleModule<unknown[], JSONSchema[]>>;
|
|
@@ -10,24 +8,24 @@ declare const configs: {
|
|
|
10
8
|
recommended: {
|
|
11
9
|
files: string[];
|
|
12
10
|
languageOptions: {
|
|
13
|
-
parser: typeof
|
|
11
|
+
parser: typeof import("jsonc-eslint-parser");
|
|
14
12
|
};
|
|
15
13
|
name: string;
|
|
16
14
|
plugins: {
|
|
17
|
-
readonly
|
|
15
|
+
readonly 'package-json': import("eslint").ESLint.Plugin;
|
|
18
16
|
};
|
|
19
17
|
rules: {
|
|
20
18
|
[k: string]: "error";
|
|
21
19
|
};
|
|
22
20
|
};
|
|
23
|
-
|
|
21
|
+
'recommended-publishable': {
|
|
24
22
|
files: string[];
|
|
25
23
|
languageOptions: {
|
|
26
|
-
parser: typeof
|
|
24
|
+
parser: typeof import("jsonc-eslint-parser");
|
|
27
25
|
};
|
|
28
26
|
name: string;
|
|
29
27
|
plugins: {
|
|
30
|
-
readonly
|
|
28
|
+
readonly 'package-json': import("eslint").ESLint.Plugin;
|
|
31
29
|
};
|
|
32
30
|
rules: {
|
|
33
31
|
[x: string]: "error";
|
|
@@ -36,11 +34,11 @@ declare const configs: {
|
|
|
36
34
|
stylistic: {
|
|
37
35
|
files: string[];
|
|
38
36
|
languageOptions: {
|
|
39
|
-
parser: typeof
|
|
37
|
+
parser: typeof import("jsonc-eslint-parser");
|
|
40
38
|
};
|
|
41
39
|
name: string;
|
|
42
40
|
plugins: {
|
|
43
|
-
readonly
|
|
41
|
+
readonly 'package-json': import("eslint").ESLint.Plugin;
|
|
44
42
|
};
|
|
45
43
|
rules: {
|
|
46
44
|
[k: string]: "error";
|
package/lib/plugin.d.mts
CHANGED
|
@@ -13,20 +13,20 @@ declare const plugin: {
|
|
|
13
13
|
};
|
|
14
14
|
name: string;
|
|
15
15
|
plugins: {
|
|
16
|
-
readonly
|
|
16
|
+
readonly 'package-json': ESLint.Plugin;
|
|
17
17
|
};
|
|
18
18
|
rules: {
|
|
19
19
|
[k: string]: "error";
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
'recommended-publishable': {
|
|
23
23
|
files: string[];
|
|
24
24
|
languageOptions: {
|
|
25
25
|
parser: typeof parserJsonc;
|
|
26
26
|
};
|
|
27
27
|
name: string;
|
|
28
28
|
plugins: {
|
|
29
|
-
readonly
|
|
29
|
+
readonly 'package-json': ESLint.Plugin;
|
|
30
30
|
};
|
|
31
31
|
rules: {
|
|
32
32
|
[x: string]: "error";
|
|
@@ -39,7 +39,7 @@ declare const plugin: {
|
|
|
39
39
|
};
|
|
40
40
|
name: string;
|
|
41
41
|
plugins: {
|
|
42
|
-
readonly
|
|
42
|
+
readonly 'package-json': ESLint.Plugin;
|
|
43
43
|
};
|
|
44
44
|
rules: {
|
|
45
45
|
[k: string]: "error";
|
package/lib/types/estree.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ interface CreateRequirePropertyRuleOptions {
|
|
|
5
5
|
/**
|
|
6
6
|
* The category for this rule.
|
|
7
7
|
*/
|
|
8
|
-
category?:
|
|
8
|
+
category?: 'Publishable' | (string & {});
|
|
9
9
|
/** The value to use when fixing a violation when this property is missing */
|
|
10
10
|
fixValue?: unknown;
|
|
11
11
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-package-json",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.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": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"astro-og-canvas": "0.11.1",
|
|
68
68
|
"canvaskit-wasm": "0.41.1",
|
|
69
69
|
"console-fail-test": "0.6.0",
|
|
70
|
-
"eslint": "10.
|
|
70
|
+
"eslint": "10.4.0",
|
|
71
71
|
"eslint-doc-generator": "3.3.1",
|
|
72
72
|
"eslint-plugin-eslint-plugin": "7.3.1",
|
|
73
73
|
"eslint-plugin-jsdoc": "62.9.0",
|
|
@@ -78,11 +78,9 @@
|
|
|
78
78
|
"eslint-plugin-regexp": "3.1.0",
|
|
79
79
|
"eslint-plugin-unicorn": "64.0.0",
|
|
80
80
|
"eslint-plugin-yml": "3.3.0",
|
|
81
|
-
"husky": "9.1.7",
|
|
82
81
|
"jiti": "2.7.0",
|
|
83
82
|
"json-schema-to-ts": "3.1.1",
|
|
84
|
-
"knip": "6.
|
|
85
|
-
"lint-staged": "17.0.2",
|
|
83
|
+
"knip": "6.14.0",
|
|
86
84
|
"prettier": "3.8.0",
|
|
87
85
|
"prettier-plugin-curly": "0.4.0",
|
|
88
86
|
"prettier-plugin-packagejson": "3.0.0",
|
|
@@ -90,6 +88,7 @@
|
|
|
90
88
|
"prettier-plugin-sh": "0.18.0",
|
|
91
89
|
"pretty-quick": "4.2.2",
|
|
92
90
|
"sharp": "0.34.5",
|
|
91
|
+
"simple-git-hooks": "2.13.1",
|
|
93
92
|
"starlight-auto-sidebar": "0.4.0",
|
|
94
93
|
"tsdown": "0.22.0",
|
|
95
94
|
"typescript": "6.0.2",
|