From d6a99b77da7835610e3d630d79a4b11017b7c4f2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 9 Oct 2021 19:08:38 -0700 Subject: [PATCH] tools: remove @babel/plugin-syntax-top-level-await MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ESLint 8.0.0 introduced support for top level await, so @babel/plugin-syntax-top-level-await is no longer necessary. PR-URL: https://github.com/nodejs/node/pull/40394 Reviewed-By: Michaƫl Zasso Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca --- .eslintrc.js | 2 -- tools/update-babel-eslint.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e84c7408d11572..d4c0bfa667da3f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,7 +19,6 @@ const hacks = [ '@babel/eslint-parser', '@babel/plugin-syntax-class-properties', '@babel/plugin-syntax-import-assertions', - '@babel/plugin-syntax-top-level-await', ]; Module._findPath = (request, paths, isMain) => { const r = ModuleFindPath(request, paths, isMain); @@ -43,7 +42,6 @@ module.exports = { plugins: [ Module._findPath('@babel/plugin-syntax-class-properties'), Module._findPath('@babel/plugin-syntax-import-assertions'), - Module._findPath('@babel/plugin-syntax-top-level-await'), ], }, requireConfigFile: false, diff --git a/tools/update-babel-eslint.sh b/tools/update-babel-eslint.sh index 4afec8cf4ed923..6b3f8d24ab9157 100755 --- a/tools/update-babel-eslint.sh +++ b/tools/update-babel-eslint.sh @@ -18,7 +18,7 @@ ROOT="$PWD/../.." NPM="$ROOT/deps/npm/bin/npm-cli.js" "$NODE" "$NPM" init --yes -"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-import-assertions@latest @babel/plugin-syntax-top-level-await@latest +"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-import-assertions@latest # Use dmn to remove some unneeded files. "$NODE" "$NPM" exec -- dmn@2.2.2 -f clean