diff --git a/lib/util/get-configured-node-version.js b/lib/util/get-configured-node-version.js index ff5f9dcd..c1395d7f 100644 --- a/lib/util/get-configured-node-version.js +++ b/lib/util/get-configured-node-version.js @@ -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. @@ -52,7 +52,7 @@ module.exports = function getConfiguredNodeVersion(context) { return ( getSemverRange(version) || getEnginesNode(filePath) || - getSemverRange(">=8.0.0") + getSemverRange(">=16.0.0") ) } diff --git a/tests/lib/rules/no-unsupported-features/es-syntax.js b/tests/lib/rules/no-unsupported-features/es-syntax.js index 1e402321..0f85de62 100644 --- a/tests/lib/rules/no-unsupported-features/es-syntax.js +++ b/tests/lib/rules/no-unsupported-features/es-syntax.js @@ -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", @@ -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",