Skip to content

Commit

Permalink
✨ change default node version of some rules to 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed May 2, 2019
1 parent fe2343f commit c9b69ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/rules/no-unsupported-features/es-builtins.md
Expand Up @@ -25,12 +25,12 @@ For example of `package.json`:
"name": "your-module",
"version": "1.0.0",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
}
}
```

If you omit the [engines] field, this rule chooses `>=6.0.0` as the configured Node.js version since `6` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
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)).

### Options

Expand Down
6 changes: 3 additions & 3 deletions docs/rules/no-unsupported-features/es-syntax.md
Expand Up @@ -28,19 +28,19 @@ For example of `package.json`:
"name": "your-module",
"version": "1.0.0",
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
}
}
```

If you omit the [engines] field, this rule chooses `>=6.0.0` as the configured Node.js version since `6` is the minimum version the community is maintaining (see also [Node.js Release Working Group](https://github.com/nodejs/Release#readme)).
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)).

### Options

```json
{
"node/no-unsupported-features/es-syntax": ["error", {
"version": ">=6.0.0",
"version": ">=8.0.0",
"ignores": []
}]
}
Expand Down
4 changes: 2 additions & 2 deletions lib/util/get-configured-node-version.js
Expand Up @@ -23,7 +23,7 @@ function getEnginesNode(filename) {
*
* 1. Parse a given version then return it if it's valid.
* 2. Look package.json up and parse `engines.node` then return it if it's valid.
* 3. Return `>=6.0.0`.
* 3. Return `>=8.0.0`.
*
* @param {string|undefined} version The version range text.
* @param {string} filename The path to the current linting file.
Expand All @@ -34,6 +34,6 @@ module.exports = function getConfiguredNodeVersion(version, filename) {
return (
getSemverRange(version) ||
getEnginesNode(filename) ||
getSemverRange(">=6.0.0")
getSemverRange(">=8.0.0")
)
}

0 comments on commit c9b69ed

Please sign in to comment.