Skip to content

Commit

Permalink
feat!: engines.node defaults to 16.0.0
Browse files Browse the repository at this point in the history
node.js < 13, v15 has been eol.
and node.js v14 will be eol in a few months.

refs: #42
  • Loading branch information
aladdin-add committed Mar 29, 2023
1 parent 1546dc6 commit ce7a3cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/get-configured-node-version.js
Expand Up @@ -36,7 +36,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 `>=8.0.0`.
* 3. Return `>=16.0.0`.
*
* @param {string|undefined} version The version range text.
* @param {string} filename The path to the current linting file.
Expand All @@ -52,7 +52,7 @@ module.exports = function getConfiguredNodeVersion(context) {
return (
getSemverRange(version) ||
getEnginesNode(filePath) ||
getSemverRange(">=8.0.0")
getSemverRange(">=16.0.0")
)
}

Expand Down
2 changes: 2 additions & 0 deletions tests/lib/rules/no-unsupported-features/es-syntax.js
Expand Up @@ -2663,6 +2663,7 @@ ruleTester.run(
{
filename: fixture("invalid/a.js"),
code: "var a = { ...obj }",
options: [{version: '>=8.0.0'}],
errors: [
{
messageId: "no-rest-spread-properties",
Expand All @@ -2683,6 +2684,7 @@ ruleTester.run(
{
filename: fixture("nothing/a.js"),
code: "var a = { ...obj }",
options: [{version: '>=8.0.0'}],
errors: [
{
messageId: "no-rest-spread-properties",
Expand Down

0 comments on commit ce7a3cc

Please sign in to comment.