eslint-plugin-package-json 1.0.0 โ 1.2.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/README.md +99 -79
- package/lib/createRule.d.mts +2 -2
- package/lib/experimental/index.d.mts +34 -0
- package/lib/experimental/index.mjs +7 -0
- package/lib/experimental/plugin.d.mts +40 -0
- package/lib/experimental/plugin.mjs +32 -0
- 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 +19 -11
- package/CHANGELOG.md +0 -1436
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
|
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
<p align="center">
|
|
17
16
|
<!-- prettier-ignore-start -->
|
|
18
17
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
19
|
-
<a href="#contributors" target="_blank"><img alt="๐ช All Contributors:
|
|
18
|
+
<a href="#contributors" target="_blank"><img alt="๐ช All Contributors: 43" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-43-21bb42.svg" /></a>
|
|
20
19
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
21
20
|
<!-- prettier-ignore-end -->
|
|
22
21
|
<a href="https://codecov.io/gh/michaelfaith/eslint-plugin-package-json" target="_blank"><img alt="๐งช Coverage" src="https://img.shields.io/codecov/c/github/michaelfaith/eslint-plugin-package-json?label=%F0%9F%A7%AA%20coverage" /></a>
|
|
@@ -49,44 +48,6 @@ See [Getting Started](https://eslint-plugin-package-json.dev/getting-started) fo
|
|
|
49
48
|
| [order-properties](https://eslint-plugin-package-json.dev/rules/order-properties) | Package properties should be declared in standard order | ๐จ | ๐ง | |
|
|
50
49
|
| [repository-shorthand](https://eslint-plugin-package-json.dev/rules/repository-shorthand) | Enforce either object or shorthand declaration for repository. | โ
๐ฆ | ๐ง | |
|
|
51
50
|
| [require-attribution](https://eslint-plugin-package-json.dev/rules/require-attribution) | 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. | โ
๐ฆ | | ๐ก |
|
|
52
|
-
| [require-author](https://eslint-plugin-package-json.dev/rules/require-properties/require-author) | Requires the `author` property to be present. | | | |
|
|
53
|
-
| [require-bin](https://eslint-plugin-package-json.dev/rules/require-properties/require-bin) | Requires the `bin` property to be present. | | | |
|
|
54
|
-
| [require-browser](https://eslint-plugin-package-json.dev/rules/require-properties/require-browser) | Requires the `browser` property to be present. | | | |
|
|
55
|
-
| [require-bugs](https://eslint-plugin-package-json.dev/rules/require-properties/require-bugs) | Requires the `bugs` property to be present. | | | |
|
|
56
|
-
| [require-bundleDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-bundleDependencies) | Requires the `bundleDependencies` property to be present. | | | |
|
|
57
|
-
| [require-config](https://eslint-plugin-package-json.dev/rules/require-properties/require-config) | Requires the `config` property to be present. | | | |
|
|
58
|
-
| [require-contributors](https://eslint-plugin-package-json.dev/rules/require-properties/require-contributors) | Requires the `contributors` property to be present. | | | |
|
|
59
|
-
| [require-cpu](https://eslint-plugin-package-json.dev/rules/require-properties/require-cpu) | Requires the `cpu` property to be present. | | | |
|
|
60
|
-
| [require-dependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-dependencies) | Requires the `dependencies` property to be present. | | | |
|
|
61
|
-
| [require-description](https://eslint-plugin-package-json.dev/rules/require-properties/require-description) | Requires the `description` property to be present. | โ
๐ฆ | | |
|
|
62
|
-
| [require-devDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-devDependencies) | Requires the `devDependencies` property to be present. | | | |
|
|
63
|
-
| [require-devEngines](https://eslint-plugin-package-json.dev/rules/require-properties/require-devEngines) | Requires the `devEngines` property to be present. | | | |
|
|
64
|
-
| [require-directories](https://eslint-plugin-package-json.dev/rules/require-properties/require-directories) | Requires the `directories` property to be present. | | | |
|
|
65
|
-
| [require-engines](https://eslint-plugin-package-json.dev/rules/require-properties/require-engines) | Requires the `engines` property to be present. | | | |
|
|
66
|
-
| [require-exports](https://eslint-plugin-package-json.dev/rules/require-properties/require-exports) | Requires the `exports` property to be present. | โ
๐ฆ | | |
|
|
67
|
-
| [require-files](https://eslint-plugin-package-json.dev/rules/require-properties/require-files) | Requires the `files` property to be present. | โ
๐ฆ | | |
|
|
68
|
-
| [require-funding](https://eslint-plugin-package-json.dev/rules/require-properties/require-funding) | Requires the `funding` property to be present. | | | |
|
|
69
|
-
| [require-gypfile](https://eslint-plugin-package-json.dev/rules/require-properties/require-gypfile) | Requires the `gypfile` property to be present. | | | |
|
|
70
|
-
| [require-homepage](https://eslint-plugin-package-json.dev/rules/require-properties/require-homepage) | Requires the `homepage` property to be present. | | | |
|
|
71
|
-
| [require-keywords](https://eslint-plugin-package-json.dev/rules/require-properties/require-keywords) | Requires the `keywords` property to be present. | | | |
|
|
72
|
-
| [require-libc](https://eslint-plugin-package-json.dev/rules/require-properties/require-libc) | Requires the `libc` property to be present. | | | |
|
|
73
|
-
| [require-license](https://eslint-plugin-package-json.dev/rules/require-properties/require-license) | Requires the `license` property to be present. | โ
๐ฆ | | |
|
|
74
|
-
| [require-main](https://eslint-plugin-package-json.dev/rules/require-properties/require-main) | Requires the `main` property to be present. | | | |
|
|
75
|
-
| [require-man](https://eslint-plugin-package-json.dev/rules/require-properties/require-man) | Requires the `man` property to be present. | | | |
|
|
76
|
-
| [require-module](https://eslint-plugin-package-json.dev/rules/require-properties/require-module) | Requires the `module` property to be present. | | | |
|
|
77
|
-
| [require-name](https://eslint-plugin-package-json.dev/rules/require-properties/require-name) | Requires the `name` property to be present. | โ
๐ฆ | | |
|
|
78
|
-
| [require-optionalDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-optionalDependencies) | Requires the `optionalDependencies` property to be present. | | | |
|
|
79
|
-
| [require-os](https://eslint-plugin-package-json.dev/rules/require-properties/require-os) | Requires the `os` property to be present. | | | |
|
|
80
|
-
| [require-packageManager](https://eslint-plugin-package-json.dev/rules/require-properties/require-packageManager) | Requires the `packageManager` property to be present. | | | |
|
|
81
|
-
| [require-peerDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependencies) | Requires the `peerDependencies` property to be present. | | | |
|
|
82
|
-
| [require-private](https://eslint-plugin-package-json.dev/rules/require-properties/require-private) | Requires the `private` property to be present. | | ๐ง | |
|
|
83
|
-
| [require-publishConfig](https://eslint-plugin-package-json.dev/rules/require-properties/require-publishConfig) | Requires the `publishConfig` property to be present. | | | |
|
|
84
|
-
| [require-repository](https://eslint-plugin-package-json.dev/rules/require-properties/require-repository) | Requires the `repository` property to be present. | โ
๐ฆ | | |
|
|
85
|
-
| [require-scripts](https://eslint-plugin-package-json.dev/rules/require-properties/require-scripts) | Requires the `scripts` property to be present. | | | |
|
|
86
|
-
| [require-sideEffects](https://eslint-plugin-package-json.dev/rules/require-properties/require-sideEffects) | Requires the `sideEffects` property to be present. | โ
๐ฆ | | |
|
|
87
|
-
| [require-type](https://eslint-plugin-package-json.dev/rules/require-properties/require-type) | Requires the `type` property to be present. | โ
๐ฆ | ๐ง | |
|
|
88
|
-
| [require-types](https://eslint-plugin-package-json.dev/rules/require-properties/require-types) | Requires the `types` property to be present. | | | |
|
|
89
|
-
| [require-version](https://eslint-plugin-package-json.dev/rules/require-properties/require-version) | Requires the `version` property to be present. | โ
๐ฆ | | |
|
|
90
51
|
| [restrict-dependency-ranges](https://eslint-plugin-package-json.dev/rules/restrict-dependency-ranges) | Restricts the range of dependencies to allow or disallow specific types of ranges. | | | ๐ก |
|
|
91
52
|
| [restrict-private-properties](https://eslint-plugin-package-json.dev/rules/restrict-private-properties) | Disallows unnecessary properties in private packages. | | ๐ง | ๐ก |
|
|
92
53
|
| [restrict-top-level-properties](https://eslint-plugin-package-json.dev/rules/restrict-top-level-properties) | Disallows specified top-level properties in package.json. | | | ๐ก |
|
|
@@ -94,47 +55,100 @@ See [Getting Started](https://eslint-plugin-package-json.dev/getting-started) fo
|
|
|
94
55
|
| [sort-collections](https://eslint-plugin-package-json.dev/rules/sort-collections) | Selected collections must be in a consistent order (lexicographical for most; lifecycle-aware for scripts). | โ
๐ฆ | ๐ง | |
|
|
95
56
|
| [specify-peers-locally](https://eslint-plugin-package-json.dev/rules/specify-peers-locally) | Requires that all peer dependencies are also declared as dev dependencies | โ
๐ฆ | | ๐ก |
|
|
96
57
|
| [unique-dependencies](https://eslint-plugin-package-json.dev/rules/unique-dependencies) | Checks a dependency isn't specified more than once (i.e. in `dependencies` and `devDependencies`) | โ
๐ฆ | | ๐ก |
|
|
97
|
-
| [valid-author](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-author) | Enforce that the `author` property is valid. | โ
๐ฆ | | |
|
|
98
|
-
| [valid-bin](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bin) | Enforce that the `bin` property is valid. | โ
๐ฆ | | |
|
|
99
|
-
| [valid-browser](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-browser) | Enforce that the `browser` property is valid. | โ
๐ฆ | | |
|
|
100
|
-
| [valid-bugs](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bugs) | Enforce that the `bugs` property is valid. | โ
๐ฆ | | |
|
|
101
|
-
| [valid-bundleDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bundleDependencies) | Enforce that the `bundleDependencies` (also `bundledDependencies`) property is valid. | โ
๐ฆ | | |
|
|
102
|
-
| [valid-config](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-config) | Enforce that the `config` property is valid. | โ
๐ฆ | | |
|
|
103
|
-
| [valid-contributors](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-contributors) | Enforce that the `contributors` property is valid. | โ
๐ฆ | | |
|
|
104
|
-
| [valid-cpu](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-cpu) | Enforce that the `cpu` property is valid. | โ
๐ฆ | | |
|
|
105
|
-
| [valid-dependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-dependencies) | Enforce that the `dependencies` property is valid. | โ
๐ฆ | | |
|
|
106
|
-
| [valid-description](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-description) | Enforce that the `description` property is valid. | โ
๐ฆ | | |
|
|
107
|
-
| [valid-devDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-devDependencies) | Enforce that the `devDependencies` property is valid. | โ
๐ฆ | | |
|
|
108
|
-
| [valid-devEngines](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-devEngines) | Enforce that the `devEngines` property is valid. | โ
๐ฆ | | |
|
|
109
|
-
| [valid-directories](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-directories) | Enforce that the `directories` property is valid. | โ
๐ฆ | | |
|
|
110
|
-
| [valid-engines](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-engines) | Enforce that the `engines` property is valid. | โ
๐ฆ | | |
|
|
111
|
-
| [valid-exports](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-exports) | Enforce that the `exports` property is valid. | โ
๐ฆ | | |
|
|
112
|
-
| [valid-files](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-files) | Enforce that the `files` property is valid. | โ
๐ฆ | | |
|
|
113
|
-
| [valid-funding](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-funding) | Enforce that the `funding` property is valid. | โ
๐ฆ | | |
|
|
114
|
-
| [valid-gypfile](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-gypfile) | Enforce that the `gypfile` property is valid. | โ
๐ฆ | | |
|
|
115
|
-
| [valid-homepage](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-homepage) | Enforce that the `homepage` property is valid. | โ
๐ฆ | | |
|
|
116
|
-
| [valid-keywords](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-keywords) | Enforce that the `keywords` property is valid. | โ
๐ฆ | | |
|
|
117
|
-
| [valid-libc](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-libc) | Enforce that the `libc` property is valid. | โ
๐ฆ | | |
|
|
118
|
-
| [valid-license](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-license) | Enforce that the `license` property is valid. | โ
๐ฆ | | |
|
|
119
|
-
| [valid-main](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-main) | Enforce that the `main` property is valid. | โ
๐ฆ | | |
|
|
120
|
-
| [valid-man](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-man) | Enforce that the `man` property is valid. | โ
๐ฆ | | |
|
|
121
|
-
| [valid-module](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-module) | Enforce that the `module` property is valid. | โ
๐ฆ | | |
|
|
122
|
-
| [valid-name](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-name) | Enforce that the `name` property is valid. | โ
๐ฆ | | |
|
|
123
|
-
| [valid-optionalDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-optionalDependencies) | Enforce that the `optionalDependencies` property is valid. | โ
๐ฆ | | |
|
|
124
|
-
| [valid-os](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-os) | Enforce that the `os` property is valid. | โ
๐ฆ | | |
|
|
125
|
-
| [valid-packageManager](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-packageManager) | Enforce that the `packageManager` property is valid. | โ
๐ฆ | | |
|
|
126
|
-
| [valid-peerDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-peerDependencies) | Enforce that the `peerDependencies` property is valid. | โ
๐ฆ | | |
|
|
127
|
-
| [valid-peerDependenciesMeta](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-peerDependenciesMeta) | Enforce that the `peerDependenciesMeta` property is valid. | โ
๐ฆ | | |
|
|
128
58
|
| [valid-peerDependenciesMeta-relationship](https://eslint-plugin-package-json.dev/rules/valid-peerDependenciesMeta-relationship) | Enforces that any dependencies declared in `peerDependenciesMeta` are also defined in the package's `peerDependencies`. | โ
๐ฆ | | ๐ก |
|
|
129
|
-
| [valid-private](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-private) | Enforce that the `private` property is valid. | โ
๐ฆ | | |
|
|
130
|
-
| [valid-publishConfig](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-publishConfig) | Enforce that the `publishConfig` property is valid. | โ
๐ฆ | | |
|
|
131
|
-
| [valid-repository](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-repository) | Enforce that the `repository` property is valid. | โ
๐ฆ | | |
|
|
132
59
|
| [valid-repository-directory](https://eslint-plugin-package-json.dev/rules/valid-repository-directory) | Enforce that if repository directory is specified, it matches the path to the package.json file | โ
๐ฆ | | ๐ก |
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
60
|
+
|
|
61
|
+
### Require Properties
|
|
62
|
+
|
|
63
|
+
This group of rules allows you to require that the associated top-level property must be present in the `package.json`.
|
|
64
|
+
|
|
65
|
+
| Name | Description | ๐ผ | ๐ง | ๐ก |
|
|
66
|
+
| :--------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------- | :---- | :-- | :-- |
|
|
67
|
+
| [require-author](https://eslint-plugin-package-json.dev/rules/require-properties/require-author) | Requires the `author` property to be present. | | | |
|
|
68
|
+
| [require-bin](https://eslint-plugin-package-json.dev/rules/require-properties/require-bin) | Requires the `bin` property to be present. | | | |
|
|
69
|
+
| [require-browser](https://eslint-plugin-package-json.dev/rules/require-properties/require-browser) | Requires the `browser` property to be present. | | | |
|
|
70
|
+
| [require-bugs](https://eslint-plugin-package-json.dev/rules/require-properties/require-bugs) | Requires the `bugs` property to be present. | | | |
|
|
71
|
+
| [require-bundleDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-bundleDependencies) | Requires the `bundleDependencies` property to be present. | | | |
|
|
72
|
+
| [require-config](https://eslint-plugin-package-json.dev/rules/require-properties/require-config) | Requires the `config` property to be present. | | | |
|
|
73
|
+
| [require-contributors](https://eslint-plugin-package-json.dev/rules/require-properties/require-contributors) | Requires the `contributors` property to be present. | | | |
|
|
74
|
+
| [require-cpu](https://eslint-plugin-package-json.dev/rules/require-properties/require-cpu) | Requires the `cpu` property to be present. | | | |
|
|
75
|
+
| [require-dependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-dependencies) | Requires the `dependencies` property to be present. | | | |
|
|
76
|
+
| [require-description](https://eslint-plugin-package-json.dev/rules/require-properties/require-description) | Requires the `description` property to be present. | โ
๐ฆ | | |
|
|
77
|
+
| [require-devDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-devDependencies) | Requires the `devDependencies` property to be present. | | | |
|
|
78
|
+
| [require-devEngines](https://eslint-plugin-package-json.dev/rules/require-properties/require-devEngines) | Requires the `devEngines` property to be present. | | | |
|
|
79
|
+
| [require-directories](https://eslint-plugin-package-json.dev/rules/require-properties/require-directories) | Requires the `directories` property to be present. | | | |
|
|
80
|
+
| [require-engines](https://eslint-plugin-package-json.dev/rules/require-properties/require-engines) | Requires the `engines` property to be present. | | | |
|
|
81
|
+
| [require-exports](https://eslint-plugin-package-json.dev/rules/require-properties/require-exports) | Requires the `exports` property to be present. | โ
๐ฆ | | |
|
|
82
|
+
| [require-files](https://eslint-plugin-package-json.dev/rules/require-properties/require-files) | Requires the `files` property to be present. | โ
๐ฆ | | |
|
|
83
|
+
| [require-funding](https://eslint-plugin-package-json.dev/rules/require-properties/require-funding) | Requires the `funding` property to be present. | | | |
|
|
84
|
+
| [require-gypfile](https://eslint-plugin-package-json.dev/rules/require-properties/require-gypfile) | Requires the `gypfile` property to be present. | | | |
|
|
85
|
+
| [require-homepage](https://eslint-plugin-package-json.dev/rules/require-properties/require-homepage) | Requires the `homepage` property to be present. | | | |
|
|
86
|
+
| [require-keywords](https://eslint-plugin-package-json.dev/rules/require-properties/require-keywords) | Requires the `keywords` property to be present. | | | |
|
|
87
|
+
| [require-libc](https://eslint-plugin-package-json.dev/rules/require-properties/require-libc) | Requires the `libc` property to be present. | | | |
|
|
88
|
+
| [require-license](https://eslint-plugin-package-json.dev/rules/require-properties/require-license) | Requires the `license` property to be present. | โ
๐ฆ | | |
|
|
89
|
+
| [require-main](https://eslint-plugin-package-json.dev/rules/require-properties/require-main) | Requires the `main` property to be present. | | | |
|
|
90
|
+
| [require-man](https://eslint-plugin-package-json.dev/rules/require-properties/require-man) | Requires the `man` property to be present. | | | |
|
|
91
|
+
| [require-module](https://eslint-plugin-package-json.dev/rules/require-properties/require-module) | Requires the `module` property to be present. | | | |
|
|
92
|
+
| [require-name](https://eslint-plugin-package-json.dev/rules/require-properties/require-name) | Requires the `name` property to be present. | โ
๐ฆ | | |
|
|
93
|
+
| [require-optionalDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-optionalDependencies) | Requires the `optionalDependencies` property to be present. | | | |
|
|
94
|
+
| [require-os](https://eslint-plugin-package-json.dev/rules/require-properties/require-os) | Requires the `os` property to be present. | | | |
|
|
95
|
+
| [require-packageManager](https://eslint-plugin-package-json.dev/rules/require-properties/require-packageManager) | Requires the `packageManager` property to be present. | | | |
|
|
96
|
+
| [require-peerDependencies](https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependencies) | Requires the `peerDependencies` property to be present. | | | |
|
|
97
|
+
| [require-peerDependenciesMeta](https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependenciesMeta) | Requires the `peerDependenciesMeta` property to be present. | | | |
|
|
98
|
+
| [require-private](https://eslint-plugin-package-json.dev/rules/require-properties/require-private) | Requires the `private` property to be present. | | ๐ง | |
|
|
99
|
+
| [require-publishConfig](https://eslint-plugin-package-json.dev/rules/require-properties/require-publishConfig) | Requires the `publishConfig` property to be present. | | | |
|
|
100
|
+
| [require-repository](https://eslint-plugin-package-json.dev/rules/require-properties/require-repository) | Requires the `repository` property to be present. | โ
๐ฆ | | |
|
|
101
|
+
| [require-scripts](https://eslint-plugin-package-json.dev/rules/require-properties/require-scripts) | Requires the `scripts` property to be present. | | | |
|
|
102
|
+
| [require-sideEffects](https://eslint-plugin-package-json.dev/rules/require-properties/require-sideEffects) | Requires the `sideEffects` property to be present. | โ
๐ฆ | | |
|
|
103
|
+
| [require-type](https://eslint-plugin-package-json.dev/rules/require-properties/require-type) | Requires the `type` property to be present. | โ
๐ฆ | ๐ง | |
|
|
104
|
+
| [require-types](https://eslint-plugin-package-json.dev/rules/require-properties/require-types) | Requires the `types` property to be present. | | | |
|
|
105
|
+
| [require-version](https://eslint-plugin-package-json.dev/rules/require-properties/require-version) | Requires the `version` property to be present. | โ
๐ฆ | | |
|
|
106
|
+
|
|
107
|
+
### Valid Properties
|
|
108
|
+
|
|
109
|
+
This group of rules allows you to enforce that the value of the associated top-level property is valid. All of these rules are include in the `recommended` config.
|
|
110
|
+
|
|
111
|
+
| Nameย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย | Description | ๐ผ | ๐ง | ๐ก |
|
|
112
|
+
| :--------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | :---- | :-- | :-- |
|
|
113
|
+
| [valid-author](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-author) | Enforce that the `author` property is valid. | โ
๐ฆ | | |
|
|
114
|
+
| [valid-bin](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bin) | Enforce that the `bin` property is valid. | โ
๐ฆ | | |
|
|
115
|
+
| [valid-browser](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-browser) | Enforce that the `browser` property is valid. | โ
๐ฆ | | |
|
|
116
|
+
| [valid-bugs](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bugs) | Enforce that the `bugs` property is valid. | โ
๐ฆ | | |
|
|
117
|
+
| [valid-bundleDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-bundleDependencies) | Enforce that the `bundleDependencies` (also `bundledDependencies`) property is valid. | โ
๐ฆ | | |
|
|
118
|
+
| [valid-config](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-config) | Enforce that the `config` property is valid. | โ
๐ฆ | | |
|
|
119
|
+
| [valid-contributors](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-contributors) | Enforce that the `contributors` property is valid. | โ
๐ฆ | | |
|
|
120
|
+
| [valid-cpu](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-cpu) | Enforce that the `cpu` property is valid. | โ
๐ฆ | | |
|
|
121
|
+
| [valid-dependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-dependencies) | Enforce that the `dependencies` property is valid. | โ
๐ฆ | | |
|
|
122
|
+
| [valid-description](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-description) | Enforce that the `description` property is valid. | โ
๐ฆ | | |
|
|
123
|
+
| [valid-devDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-devDependencies) | Enforce that the `devDependencies` property is valid. | โ
๐ฆ | | |
|
|
124
|
+
| [valid-devEngines](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-devEngines) | Enforce that the `devEngines` property is valid. | โ
๐ฆ | | |
|
|
125
|
+
| [valid-directories](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-directories) | Enforce that the `directories` property is valid. | โ
๐ฆ | | |
|
|
126
|
+
| [valid-engines](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-engines) | Enforce that the `engines` property is valid. | โ
๐ฆ | | |
|
|
127
|
+
| [valid-exports](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-exports) | Enforce that the `exports` property is valid. | โ
๐ฆ | | |
|
|
128
|
+
| [valid-files](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-files) | Enforce that the `files` property is valid. | โ
๐ฆ | | |
|
|
129
|
+
| [valid-funding](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-funding) | Enforce that the `funding` property is valid. | โ
๐ฆ | | |
|
|
130
|
+
| [valid-gypfile](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-gypfile) | Enforce that the `gypfile` property is valid. | โ
๐ฆ | | |
|
|
131
|
+
| [valid-homepage](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-homepage) | Enforce that the `homepage` property is valid. | โ
๐ฆ | | |
|
|
132
|
+
| [valid-keywords](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-keywords) | Enforce that the `keywords` property is valid. | โ
๐ฆ | | |
|
|
133
|
+
| [valid-libc](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-libc) | Enforce that the `libc` property is valid. | โ
๐ฆ | | |
|
|
134
|
+
| [valid-license](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-license) | Enforce that the `license` property is valid. | โ
๐ฆ | | |
|
|
135
|
+
| [valid-main](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-main) | Enforce that the `main` property is valid. | โ
๐ฆ | | |
|
|
136
|
+
| [valid-man](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-man) | Enforce that the `man` property is valid. | โ
๐ฆ | | |
|
|
137
|
+
| [valid-module](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-module) | Enforce that the `module` property is valid. | โ
๐ฆ | | |
|
|
138
|
+
| [valid-name](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-name) | Enforce that the `name` property is valid. | โ
๐ฆ | | |
|
|
139
|
+
| [valid-optionalDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-optionalDependencies) | Enforce that the `optionalDependencies` property is valid. | โ
๐ฆ | | |
|
|
140
|
+
| [valid-os](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-os) | Enforce that the `os` property is valid. | โ
๐ฆ | | |
|
|
141
|
+
| [valid-packageManager](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-packageManager) | Enforce that the `packageManager` property is valid. | โ
๐ฆ | | |
|
|
142
|
+
| [valid-peerDependencies](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-peerDependencies) | Enforce that the `peerDependencies` property is valid. | โ
๐ฆ | | |
|
|
143
|
+
| [valid-peerDependenciesMeta](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-peerDependenciesMeta) | Enforce that the `peerDependenciesMeta` property is valid. | โ
๐ฆ | | |
|
|
144
|
+
| [valid-private](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-private) | Enforce that the `private` property is valid. | โ
๐ฆ | | |
|
|
145
|
+
| [valid-publishConfig](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-publishConfig) | Enforce that the `publishConfig` property is valid. | โ
๐ฆ | | |
|
|
146
|
+
| [valid-repository](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-repository) | Enforce that the `repository` property is valid. | โ
๐ฆ | | |
|
|
147
|
+
| [valid-scripts](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-scripts) | Enforce that the `scripts` property is valid. | โ
๐ฆ | | |
|
|
148
|
+
| [valid-sideEffects](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-sideEffects) | Enforce that the `sideEffects` property is valid. | โ
๐ฆ | | |
|
|
149
|
+
| [valid-type](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-type) | Enforce that the `type` property is valid. | โ
๐ฆ | | |
|
|
150
|
+
| [valid-version](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-version) | Enforce that the `version` property is valid. | โ
๐ฆ | | |
|
|
151
|
+
| [valid-workspaces](https://eslint-plugin-package-json.dev/rules/valid-properties/valid-workspaces) | Enforce that the `workspaces` property is valid. | โ
๐ฆ | | |
|
|
138
152
|
|
|
139
153
|
<!-- end auto-generated rules list -->
|
|
140
154
|
|
|
@@ -169,6 +183,7 @@ Thanks! ๐
|
|
|
169
183
|
|
|
170
184
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
171
185
|
<!-- prettier-ignore-start -->
|
|
186
|
+
<!-- markdownlint-disable -->
|
|
172
187
|
<table>
|
|
173
188
|
<tbody>
|
|
174
189
|
<tr>
|
|
@@ -218,17 +233,22 @@ Thanks! ๐
|
|
|
218
233
|
</tr>
|
|
219
234
|
<tr>
|
|
220
235
|
<td align="center" valign="top" width="14.28%"><a href="https://hyoban.cc"><img src="https://avatars.githubusercontent.com/u/38493346?v=4?s=100" width="100px;" alt="Stephen Zhou"/><br /><sub><b>Stephen Zhou</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Ahyoban" title="Bug reports">๐</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=hyoban" title="Code">๐ป</a> <a href="#ideas-hyoban" title="Ideas, Planning, & Feedback">๐ค</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=hyoban" title="Documentation">๐</a></td>
|
|
236
|
+
<td align="center" valign="top" width="14.28%"><a href="https://www.wesleytodd.com/"><img src="https://avatars.githubusercontent.com/u/1027776?v=4?s=100" width="100px;" alt="Wes Todd"/><br /><sub><b>Wes Todd</b></sub></a><br /><a href="#ideas-wesleytodd" title="Ideas, Planning, & Feedback">๐ค</a></td>
|
|
221
237
|
<td align="center" valign="top" width="14.28%"><a href="https://ota-meshi.github.io/"><img src="https://avatars.githubusercontent.com/u/16508807?v=4?s=100" width="100px;" alt="Yosuke Ota"/><br /><sub><b>Yosuke Ota</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Aota-meshi" title="Bug reports">๐</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=ota-meshi" title="Code">๐ป</a></td>
|
|
222
238
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/b3rnhard"><img src="https://avatars.githubusercontent.com/u/10774404?v=4?s=100" width="100px;" alt="b3rnhard"/><br /><sub><b>b3rnhard</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Ab3rnhard" title="Bug reports">๐</a></td>
|
|
223
239
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chouchouji"><img src="https://avatars.githubusercontent.com/u/70570907?v=4?s=100" width="100px;" alt="chouchouji"/><br /><sub><b>chouchouji</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=chouchouji" title="Code">๐ป</a></td>
|
|
224
240
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/michaelfaith"><img src="https://avatars.githubusercontent.com/u/8071845?v=4?s=100" width="100px;" alt="michael faith"/><br /><sub><b>michael faith</b></sub></a><br /><a href="#infra-michaelfaith" title="Infrastructure (Hosting, Build-Tools, etc)">๐</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=michaelfaith" title="Code">๐ป</a> <a href="#maintenance-michaelfaith" title="Maintenance">๐ง</a> <a href="#ideas-michaelfaith" title="Ideas, Planning, & Feedback">๐ค</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Amichaelfaith" title="Bug reports">๐</a> <a href="#tool-michaelfaith" title="Tools">๐ง</a> <a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=michaelfaith" title="Documentation">๐</a> <a href="#projectManagement-michaelfaith" title="Project Management">๐</a></td>
|
|
225
241
|
<td align="center" valign="top" width="14.28%"><a href="https://roottool.vercel.app"><img src="https://avatars.githubusercontent.com/u/11808736?v=4?s=100" width="100px;" alt="roottool"/><br /><sub><b>roottool</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/commits?author=roottool" title="Code">๐ป</a></td>
|
|
242
|
+
</tr>
|
|
243
|
+
<tr>
|
|
226
244
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sunnytsang1998"><img src="https://avatars.githubusercontent.com/u/207208443?v=4?s=100" width="100px;" alt="sunnytsang1998"/><br /><sub><b>sunnytsang1998</b></sub></a><br /><a href="https://github.com/michaelfaith/eslint-plugin-package-json/issues?q=author%3Asunnytsang1998" title="Bug reports">๐</a></td>
|
|
227
245
|
</tr>
|
|
228
246
|
</tbody>
|
|
229
247
|
</table>
|
|
230
248
|
|
|
249
|
+
<!-- markdownlint-restore -->
|
|
231
250
|
<!-- prettier-ignore-end -->
|
|
251
|
+
|
|
232
252
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
233
253
|
|
|
234
254
|
## License
|
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
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import { PackageJsonPluginSettings, PackageJsonRuleModule } from "../createRule.mjs";
|
|
3
|
+
import { plugin } from "./plugin.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/experimental/index.d.ts
|
|
6
|
+
declare const configs: {
|
|
7
|
+
recommended: {
|
|
8
|
+
files: string[];
|
|
9
|
+
language: string;
|
|
10
|
+
name: string;
|
|
11
|
+
plugins: {
|
|
12
|
+
readonly 'package-json': import("eslint").ESLint.Plugin;
|
|
13
|
+
};
|
|
14
|
+
rules: {
|
|
15
|
+
[k: string]: "error";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
stylistic: {
|
|
19
|
+
files: string[];
|
|
20
|
+
language: string;
|
|
21
|
+
name: string;
|
|
22
|
+
plugins: {
|
|
23
|
+
readonly 'package-json': import("eslint").ESLint.Plugin;
|
|
24
|
+
};
|
|
25
|
+
rules: {
|
|
26
|
+
[k: string]: "error";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
declare const rules: {
|
|
31
|
+
[k: string]: PackageJsonRuleModule<unknown[], JSONSchema[]>;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { type PackageJsonPluginSettings, configs, plugin as default, rules };
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
import { PackageJsonRuleModule } from "../createRule.mjs";
|
|
3
|
+
import { ESLint } from "eslint";
|
|
4
|
+
|
|
5
|
+
//#region src/experimental/plugin.d.ts
|
|
6
|
+
declare const plugin: {
|
|
7
|
+
configs: {
|
|
8
|
+
recommended: {
|
|
9
|
+
files: string[];
|
|
10
|
+
language: string;
|
|
11
|
+
name: string;
|
|
12
|
+
plugins: {
|
|
13
|
+
readonly 'package-json': ESLint.Plugin;
|
|
14
|
+
};
|
|
15
|
+
rules: {
|
|
16
|
+
[k: string]: "error";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
stylistic: {
|
|
20
|
+
files: string[];
|
|
21
|
+
language: string;
|
|
22
|
+
name: string;
|
|
23
|
+
plugins: {
|
|
24
|
+
readonly 'package-json': ESLint.Plugin;
|
|
25
|
+
};
|
|
26
|
+
rules: {
|
|
27
|
+
[k: string]: "error";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
meta: {
|
|
32
|
+
name: string;
|
|
33
|
+
version: string;
|
|
34
|
+
};
|
|
35
|
+
rules: {
|
|
36
|
+
[k: string]: PackageJsonRuleModule<unknown[], JSONSchema[]>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { plugin };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { plugin as plugin$1 } from "../plugin.mjs";
|
|
2
|
+
import { toCompatRule } from "eslint-json-compat-utils";
|
|
3
|
+
//#region src/experimental/plugin.ts
|
|
4
|
+
const language = "json/json";
|
|
5
|
+
const rules = Object.fromEntries(Object.entries(plugin$1.rules).map(([name, rule]) => [name, toCompatRule(rule)]));
|
|
6
|
+
for (const rule of Object.values(rules)) rule.meta.languages ??= [language];
|
|
7
|
+
const plugin = {
|
|
8
|
+
configs: {
|
|
9
|
+
recommended: {
|
|
10
|
+
files: ["**/package.json"],
|
|
11
|
+
language,
|
|
12
|
+
name: "package-json/experimental-recommended",
|
|
13
|
+
plugins: { get "package-json"() {
|
|
14
|
+
return plugin;
|
|
15
|
+
} },
|
|
16
|
+
rules: plugin$1.configs.recommended.rules
|
|
17
|
+
},
|
|
18
|
+
stylistic: {
|
|
19
|
+
files: ["**/package.json"],
|
|
20
|
+
language,
|
|
21
|
+
name: "package-json/experimental-stylistic",
|
|
22
|
+
plugins: { get "package-json"() {
|
|
23
|
+
return plugin;
|
|
24
|
+
} },
|
|
25
|
+
rules: plugin$1.configs.stylistic.rules
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
meta: plugin$1.meta,
|
|
29
|
+
rules
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { plugin };
|
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
|
/**
|