Skip to content

Commit 6eeea85

Browse files
authored
V5 (#243)
* Update example docs * Update v4-to-v5.md * Create docs for v5
1 parent 2c4abc9 commit 6eeea85

File tree

8 files changed

+146
-3
lines changed

8 files changed

+146
-3
lines changed

docs/rules/required-node/require-funding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Enabling this rule will result in an error being generated if `funding` is missi
2929

3030
```json
3131
{
32-
"funding": ["index.js"]
32+
"funding": "https://github.com/ORG/REPO?sponsor=1"
3333
}
3434
```
3535

docs/v4-to-v5.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ v5.0.0 Migration Guide
77

88
> FYI: v5 drops support for Node 8 and 9. If you need support for versions of Node that have reached EOL, please use v4.
99
10+
## Rule definition change
11+
12+
[`prefer-no-devDependencies`](https://npmpackagejsonlint.org/docs/en/rules/dependencies/prefer-no-devDependencies) is been change to a `standard` rule type (#238). You must pass the severity level as a string. `error`, `warning`, or `off`.
13+
14+
## cosmicconfig v6.0.0 upgrade
15+
16+
Bump cosmicconfig from 5.2.1 to 6.0.0 (#239)
17+
18+
*Important*: Read the [cosmicconfig release notes](https://github.com/davidtheclark/cosmiconfig/blob/master/CHANGELOG.md#600)! There are breaking changes to consider.
19+
1020
## Additional changes
1121

1222
Please see the [release notes](https://github.com/tclindner/npm-package-json-lint/releases/tag/v5.0.0) for additional changes introduced in v5.0.0.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-package-json-lint",
3-
"version": "5.0.0",
3+
"version": "5.0.0-beta.1",
44
"description": "Configurable linter for package.json files.",
55
"keywords": [
66
"lint",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
id: version-5.0.0-require-funding
3+
title: require-funding
4+
original_id: require-funding
5+
---
6+
7+
Enabling this rule will result in an error being generated if `funding` is missing from the package.json file.
8+
9+
## Example .npmpackagejsonlintrc configuration
10+
11+
```json
12+
{
13+
"rules": {
14+
"require-funding": "error"
15+
}
16+
}
17+
```
18+
19+
## Rule Details
20+
21+
### *Incorrect* example(s)
22+
23+
```json
24+
{
25+
26+
}
27+
```
28+
29+
### *Correct* example(s)
30+
31+
```json
32+
{
33+
"funding": "https://github.com/ORG/REPO?sponsor=1"
34+
}
35+
```
36+
37+
## History
38+
39+
* Introduced in version 5.0.0
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
id: version-5.0.0-valid-values-engines
3+
title: valid-values-engines
4+
original_id: valid-values-engines
5+
---
6+
7+
Enabling this rule will result in an error being generated if the value in `engines` is not equal to one of the values in the array of valid values or if the version range is invalid.
8+
9+
## Example .npmpackagejsonlintrc configuration
10+
11+
```json
12+
{
13+
"rules": {
14+
"valid-values-engines": ["error", [
15+
{"node": "^6.0.0"}
16+
]]
17+
}
18+
}
19+
```
20+
21+
## Rule Details
22+
23+
### *Incorrect* example(s)
24+
25+
```json
26+
{
27+
"engines": "^6.0.0"
28+
}
29+
```
30+
31+
```json
32+
{
33+
"engines": {
34+
"node": "^10.0.0"
35+
}
36+
}
37+
```
38+
39+
```json
40+
{
41+
"engines": {
42+
"node": "^6.a.0"
43+
}
44+
}
45+
```
46+
47+
### *Correct* example(s)
48+
49+
```json
50+
{
51+
"engines": {
52+
"node": "^6.0.0"
53+
}
54+
}
55+
```
56+
57+
58+
## Shorthand for disabling the rule in .npmpackagejsonlintrc configuration
59+
60+
```json
61+
{
62+
"rules": {
63+
"valid-values-engines": "off"
64+
}
65+
}
66+
```
67+
68+
## History
69+
70+
* Introduced in version 3.1.0
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
id: version-5.0.0-v4-to-v5
3+
title: v4 to v5 Migration Guide
4+
original_id: v4-to-v5
5+
---
6+
7+
v5.0.0 Migration Guide
8+
9+
> FYI: v5 drops support for Node 8 and 9. If you need support for versions of Node that have reached EOL, please use v4.
10+
11+
## Rule definition change
12+
13+
[`prefer-no-devDependencies`](https://npmpackagejsonlint.org/docs/en/rules/dependencies/prefer-no-devDependencies) is been change to a `standard` rule type (#238). You must pass the severity level as a string. `error`, `warning`, or `off`.
14+
15+
## cosmicconfig v6.0.0 upgrade
16+
17+
Bump cosmicconfig from 5.2.1 to 6.0.0 (#239)
18+
19+
*Important*: Read the [cosmicconfig release notes](https://github.com/davidtheclark/cosmiconfig/blob/master/CHANGELOG.md#600)! There are breaking changes to consider.
20+
21+
## Additional changes
22+
23+
Please see the [release notes](https://github.com/tclindner/npm-package-json-lint/releases/tag/v5.0.0) for additional changes introduced in v5.0.0.

website/versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[
2+
"5.0.0",
23
"4.6.0",
34
"4.5.2",
45
"4.5.1",

0 commit comments

Comments
 (0)