diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1972878e94..fc3d1e701f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [16.x, 15.x, 14.x, 13.x, 12.x, 10.x, "10.12.0"] + node: [16.x, 14.x, 12.x, "12.22.0"] include: - os: windows-latest node: "12.x" diff --git a/README.md b/README.md index d1fd5ff170e..a429bdf848b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J ## Installation and Usage -Prerequisites: [Node.js](https://nodejs.org/) (`^10.12.0`, or `>=12.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) +Prerequisites: [Node.js](https://nodejs.org/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) You can install ESLint using npm: diff --git a/docs/user-guide/getting-started.md b/docs/user-guide/getting-started.md index 3b28a91a2f6..3c9633bb315 100644 --- a/docs/user-guide/getting-started.md +++ b/docs/user-guide/getting-started.md @@ -8,7 +8,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J ## Installation and Usage -Prerequisites: [Node.js](https://nodejs.org/en/) (`^10.12.0`, or `>=12.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) +Prerequisites: [Node.js](https://nodejs.org/en/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.) You can install ESLint using npm or yarn: diff --git a/lib/shared/relative-module-resolver.js b/lib/shared/relative-module-resolver.js index cd743f3795b..fcc2ac41bb3 100644 --- a/lib/shared/relative-module-resolver.js +++ b/lib/shared/relative-module-resolver.js @@ -17,14 +17,7 @@ "use strict"; -const Module = require("module"); - -/* - * `Module.createRequire` is added in v12.2.0. It supports URL as well. - * We only support the case where the argument is a filepath, not a URL. - */ -// eslint-disable-next-line node/no-unsupported-features/node-builtins, node/no-deprecated-api -const createRequire = Module.createRequire || Module.createRequireFromPath; +const { createRequire } = require("module"); module.exports = { diff --git a/package.json b/package.json index 1845500824c..90609f160a3 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "eslint-release": "^2.0.0", "eslump": "^3.0.0", "esprima": "^4.0.1", - "fs-teardown": "0.1.1", + "fs-teardown": "^0.1.3", "glob": "^7.1.6", "jsdoc": "^3.5.5", "karma": "^6.1.1", @@ -141,6 +141,6 @@ ], "license": "MIT", "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }