npm-pkg-lint 3.8.0 → 3.9.1
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 +24 -1
- package/dist/index.js +577 -341
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -288,7 +288,7 @@ but the `my-dependency` constraint requires NodeJS 12 or later this rule yields
|
|
|
288
288
|
|
|
289
289
|
Requires `engines.node` lowest major version to equal `@types/node` major version.
|
|
290
290
|
|
|
291
|
-
**Why?** If you the wrong major version of `@types/node` you might write code with is unsupported by the versions claimed to be supported by `engines.node` or you might be missing out on newer features that could be used.
|
|
291
|
+
**Why?** If you use the wrong major version of `@types/node` you might write code with is unsupported by the versions claimed to be supported by `engines.node` or you might be missing out on newer features that could be used.
|
|
292
292
|
|
|
293
293
|
Final compatibility should be tested with a version matrix but having `@types/node` at the correct version can give the developer early assistance.
|
|
294
294
|
|
|
@@ -306,3 +306,26 @@ The following `package.json`:
|
|
|
306
306
|
```
|
|
307
307
|
|
|
308
308
|
will yield an error becase `node` v12 is not the same as `@types/node` v14.
|
|
309
|
+
|
|
310
|
+
## `@tsconfig/node*` and engine constraints
|
|
311
|
+
|
|
312
|
+
Requires `engines.node` lowest major version to match the `@tsconfig/node*` base package.
|
|
313
|
+
|
|
314
|
+
**Why?** If you use the wrong `@tsconfig/node*` base package you might be targeting and outputing code that will be unsupported by the versions claimed to be supported by `engines.node` or you are outputting inefficient code which isn't taking advantage of newer features that could be used.
|
|
315
|
+
|
|
316
|
+
Final compatibility should be tested with a version matrix but having `@tsconfig/node*` at the correct version can give the developer early assistance.
|
|
317
|
+
|
|
318
|
+
The following `package.json`:
|
|
319
|
+
|
|
320
|
+
```json
|
|
321
|
+
{
|
|
322
|
+
"devDependencies": {
|
|
323
|
+
"@tsconfig/node14": "^14.1.2"
|
|
324
|
+
},
|
|
325
|
+
"engines": {
|
|
326
|
+
"node": ">= 12"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
will yield an error becase `@tsconfig/node14` is for NodeJS v14 but the `engines.node` constraints the version to v12.
|