Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2021-01-08 20:40:19 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2021-01-16 02:31:43 +0300
commit49f900e42d6a684ddc218e8779183c1aef1036e4 (patch)
treef6e443dffabd65577c28b51ad72379a484c01a43 /.eslintrc.js
parent9237280559b3296e6ae8baef8eaa0dc16aafc3c3 (diff)
tools: add support for top-level await syntax in linter
PR-URL: https://github.com/nodejs/node/pull/36911 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index af1249eae64..508f7d87f14 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -18,6 +18,7 @@ const hacks = [
'eslint-plugin-markdown',
'@babel/eslint-parser',
'@babel/plugin-syntax-class-properties',
+ '@babel/plugin-syntax-top-level-await',
];
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain);
@@ -41,7 +42,10 @@ module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
- plugins: [Module._findPath('@babel/plugin-syntax-class-properties')],
+ plugins: [
+ Module._findPath('@babel/plugin-syntax-class-properties'),
+ Module._findPath('@babel/plugin-syntax-top-level-await'),
+ ],
},
requireConfigFile: false,
sourceType: 'script',