eslint-plugin-package-json 0.89.3 → 0.89.4
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,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.89.4](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.89.3...v0.89.4) (2026-03-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🚀 Features
|
|
7
|
+
|
|
8
|
+
* add `require-main` rule ([#1631](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1631)) ([f3ea3e6](https://github.com/michaelfaith/eslint-plugin-package-json/commit/f3ea3e6ad7de445449ccfab8fb2472b382b600d5))
|
|
9
|
+
* add `require-os` rule ([#1632](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1632)) ([9b5e25d](https://github.com/michaelfaith/eslint-plugin-package-json/commit/9b5e25dad3d2e5af5882d706d52bce99de0f63b5))
|
|
10
|
+
* add `require-private` rule ([#1630](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1630)) ([770cc51](https://github.com/michaelfaith/eslint-plugin-package-json/commit/770cc51bdfe93782ae67ddb3183250c0afe33a3d))
|
|
11
|
+
* add `require-publishConfig` rule ([#1629](https://github.com/michaelfaith/eslint-plugin-package-json/issues/1629)) ([ebc187a](https://github.com/michaelfaith/eslint-plugin-package-json/commit/ebc187ae5bde43c7b1f3f27eadfdeea2e67917a9))
|
|
12
|
+
|
|
3
13
|
## [0.89.3](https://github.com/michaelfaith/eslint-plugin-package-json/compare/v0.89.2...v0.89.3) (2026-03-04)
|
|
4
14
|
|
|
5
15
|
|
package/README.md
CHANGED
|
@@ -228,10 +228,14 @@ The default settings don't conflict, and Prettier plugins can quickly fix up ord
|
|
|
228
228
|
| [require-homepage](docs/rules/require-homepage.md) | Requires the `homepage` property to be present. | | | | |
|
|
229
229
|
| [require-keywords](docs/rules/require-keywords.md) | Requires the `keywords` property to be present. | | | | |
|
|
230
230
|
| [require-license](docs/rules/require-license.md) | Requires the `license` property to be present. | ✔️ ✅ 📦 | | | |
|
|
231
|
+
| [require-main](docs/rules/require-main.md) | Requires the `main` property to be present. | | | | |
|
|
231
232
|
| [require-name](docs/rules/require-name.md) | Requires the `name` property to be present. | ✔️ ✅ 📦 | | | |
|
|
232
233
|
| [require-optionalDependencies](docs/rules/require-optionalDependencies.md) | Requires the `optionalDependencies` property to be present. | | | | |
|
|
234
|
+
| [require-os](docs/rules/require-os.md) | Requires the `os` property to be present. | | | | |
|
|
233
235
|
| [require-packageManager](docs/rules/require-packageManager.md) | Requires the `packageManager` property to be present. | | | | |
|
|
234
236
|
| [require-peerDependencies](docs/rules/require-peerDependencies.md) | Requires the `peerDependencies` property to be present. | | | | |
|
|
237
|
+
| [require-private](docs/rules/require-private.md) | Requires the `private` property to be present. | | 🔧 | | |
|
|
238
|
+
| [require-publishConfig](docs/rules/require-publishConfig.md) | Requires the `publishConfig` property to be present. | | | | |
|
|
235
239
|
| [require-repository](docs/rules/require-repository.md) | Requires the `repository` property to be present. | ✔️ ✅ 📦 | | | |
|
|
236
240
|
| [require-scripts](docs/rules/require-scripts.md) | Requires the `scripts` property to be present. | | | | |
|
|
237
241
|
| [require-sideEffects](docs/rules/require-sideEffects.md) | Requires the `sideEffects` property to be present. | ✔️ ✅ 📦 | | | |
|
|
@@ -4,9 +4,9 @@ import { CreateRequirePropertyRuleOptions } from "../utils/createSimpleRequirePr
|
|
|
4
4
|
//#region src/rules/require-properties.d.ts
|
|
5
5
|
declare const propertyConfig: [name: string, options?: CreateRequirePropertyRuleOptions][];
|
|
6
6
|
declare const rules: {
|
|
7
|
-
[k: string]: PackageJsonRuleModule<[({
|
|
7
|
+
[k: string]: PackageJsonRuleModule<[] | [({
|
|
8
8
|
ignorePrivate: boolean;
|
|
9
|
-
} | undefined)?], [{
|
|
9
|
+
} | undefined)?], [] | [{
|
|
10
10
|
readonly additionalProperties: false;
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly ignorePrivate: {
|
|
@@ -23,13 +23,17 @@ const propertyConfig = [
|
|
|
23
23
|
ignorePrivateDefault: true,
|
|
24
24
|
isRecommended: true
|
|
25
25
|
}],
|
|
26
|
+
["main"],
|
|
26
27
|
["name", {
|
|
27
28
|
ignorePrivateDefault: true,
|
|
28
29
|
isRecommended: true
|
|
29
30
|
}],
|
|
30
31
|
["optionalDependencies"],
|
|
32
|
+
["os"],
|
|
31
33
|
["packageManager"],
|
|
32
34
|
["peerDependencies"],
|
|
35
|
+
["private", { fixValue: false }],
|
|
36
|
+
["publishConfig", { ignorePrivateDefault: true }],
|
|
33
37
|
["repository", {
|
|
34
38
|
ignorePrivateDefault: true,
|
|
35
39
|
isRecommended: true
|
|
@@ -29,9 +29,9 @@ declare const createSimpleRequirePropertyRule: (propertyName: string, {
|
|
|
29
29
|
ignorePrivateDefault,
|
|
30
30
|
isRecommended
|
|
31
31
|
}?: CreateRequirePropertyRuleOptions) => {
|
|
32
|
-
rule: PackageJsonRuleModule<[({
|
|
32
|
+
rule: PackageJsonRuleModule<[] | [({
|
|
33
33
|
ignorePrivate: boolean;
|
|
34
|
-
} | undefined)?], [{
|
|
34
|
+
} | undefined)?], [] | [{
|
|
35
35
|
readonly additionalProperties: false;
|
|
36
36
|
readonly properties: {
|
|
37
37
|
readonly ignorePrivate: {
|
|
@@ -36,7 +36,7 @@ const createSimpleRequirePropertyRule = (propertyName, { category, fixValue, ign
|
|
|
36
36
|
},
|
|
37
37
|
fixable: fixValue === void 0 ? void 0 : "code",
|
|
38
38
|
messages: { missing: "Property '{{property}}' is required." },
|
|
39
|
-
schema: [{
|
|
39
|
+
schema: propertyName === "private" ? [] : [{
|
|
40
40
|
additionalProperties: false,
|
|
41
41
|
properties: { ignorePrivate: {
|
|
42
42
|
default: ignorePrivateDefault,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-package-json",
|
|
3
|
-
"version": "0.89.
|
|
3
|
+
"version": "0.89.4",
|
|
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": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"validate-npm-package-name": "^7.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@eslint-community/eslint-plugin-eslint-comments": "4.
|
|
59
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.7.0",
|
|
60
60
|
"@eslint/js": "10.0.1",
|
|
61
61
|
"@eslint/markdown": "7.5.1",
|
|
62
62
|
"@types/estree": "1.0.8",
|