Skip to content

Commit b6a12b7

Browse files
committed
chore: set to Node@>=10.0.0 when no engines field is provided
1 parent 1edcb3c commit b6a12b7

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

docs/rules/no-deprecated-api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ For example of `package.json`:
149149
"name": "your-module",
150150
"version": "1.0.0",
151151
"engines": {
152-
"node": ">=8.0.0"
152+
"node": ">=10.0.0"
153153
}
154154
}
155155
```
156156

157-
If you omit the [engines] field, this rule chooses `>=8.0.0` as the configured Node.js version since `8` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
157+
If you omit the [engines] field, this rule chooses `>=10.0.0` as the configured Node.js version since `10` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
158158

159159
### Options
160160

@@ -164,7 +164,7 @@ This rule has 3 options.
164164
{
165165
"rules": {
166166
"node/no-deprecated-api": ["error", {
167-
"version": ">=8.0.0",
167+
"version": ">=10.0.0",
168168
"ignoreModuleItems": [],
169169
"ignoreGlobalItems": []
170170
}]

docs/rules/no-unsupported-features.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ For example of `package.json`:
3131
"name": "your-module",
3232
"version": "1.0.0",
3333
"engines": {
34-
"node": ">=6.0.0"
34+
"node": ">=10.0.0"
3535
}
3636
}
3737
```
3838

39-
If the [engines] field is omitted, this rule chooses `4` since it's the minimum version the community is maintaining.
39+
If you omit the [engines] field, this rule chooses `>=10.0.0` as the configured Node.js version since `10` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
4040

4141
Examples of :-1: **incorrect** code for this rule:
4242

docs/rules/no-unsupported-features/es-builtins.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ For example of `package.json`:
2727
"name": "your-module",
2828
"version": "1.0.0",
2929
"engines": {
30-
"node": ">=8.0.0"
30+
"node": ">=10.0.0"
3131
}
3232
}
3333
```
3434

35-
If you omit the [engines] field, this rule chooses `>=8.0.0` as the configured Node.js version since `8` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
35+
If you omit the [engines] field, this rule chooses `>=10.0.0` as the configured Node.js version since `10` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
3636

3737
### Options
3838

3939
```json
4040
{
4141
"node/no-unsupported-features/es-builtins": ["error", {
42-
"version": ">=8.0.0",
42+
"version": ">=10.0.0",
4343
"ignores": []
4444
}]
4545
}

docs/rules/no-unsupported-features/es-syntax.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ For example of `package.json`:
3030
"name": "your-module",
3131
"version": "1.0.0",
3232
"engines": {
33-
"node": ">=8.0.0"
33+
"node": ">=10.0.0"
3434
}
3535
}
3636
```
3737

38-
If you omit the [engines] field, this rule chooses `>=8.0.0` as the configured Node.js version since `8` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
38+
If you omit the [engines] field, this rule chooses `>=10.0.0` as the configured Node.js version since `10` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
3939

4040
### Options
4141

4242
```json
4343
{
4444
"node/no-unsupported-features/es-syntax": ["error", {
45-
"version": ">=8.0.0",
45+
"version": ">=10.0.0",
4646
"ignores": []
4747
}]
4848
}

docs/rules/no-unsupported-features/node-builtins.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ For example of `package.json`:
2424
"name": "your-module",
2525
"version": "1.0.0",
2626
"engines": {
27-
"node": ">=8.0.0"
27+
"node": ">=10.0.0"
2828
}
2929
}
3030
```
3131

32-
If you omit the [engines] field, this rule chooses `>=8.0.0` as the configured Node.js version since `8` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
32+
If you omit the [engines] field, this rule chooses `>=10.0.0` as the configured Node.js version since `10` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
3333

3434
### Options
3535

3636
```json
3737
{
3838
"node/no-unsupported-features/node-builtins": ["error", {
39-
"version": ">=8.0.0",
39+
"version": ">=10.0.0",
4040
"ignores": []
4141
}]
4242
}

lib/rules/no-unsupported-features.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const VERSION_SCHEMA = {
3131
},
3232
],
3333
}
34-
const DEFAULT_VERSION = "4.0.0"
34+
const DEFAULT_VERSION = "10.0.0"
3535
const FUNC_TYPE = /^(?:Arrow)?Function(?:Declaration|Expression)$/u
3636
const CLASS_TYPE = /^Class(?:Declaration|Expression)$/u
3737
const DESTRUCTURING_PARENT_TYPE = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression|AssignmentExpression|VariableDeclarator)$/u

lib/util/get-configured-node-version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function getEnginesNode(filename) {
2323
*
2424
* 1. Parse a given version then return it if it's valid.
2525
* 2. Look package.json up and parse `engines.node` then return it if it's valid.
26-
* 3. Return `>=8.0.0`.
26+
* 3. Return `>=10.0.0`.
2727
*
2828
* @param {string|undefined} version The version range text.
2929
* @param {string} filename The path to the current linting file.
@@ -34,6 +34,6 @@ module.exports = function getConfiguredNodeVersion(version, filename) {
3434
return (
3535
getSemverRange(version) ||
3636
getEnginesNode(filename) ||
37-
getSemverRange(">=8.0.0")
37+
getSemverRange(">=10.0.0")
3838
)
3939
}

0 commit comments

Comments
 (0)