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-08-28 16:58:56 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2021-10-17 17:38:15 +0300
commitf5e9486eda12ffc2cc5ef7c36c45ce92ecee5722 (patch)
tree25cafec3cbe2e6c589be9fa53d075d4f9da72397 /.eslintrc.js
parentcbc7b5d4246000fa572171e7bee8bf3d6183959d (diff)
tools: add support for import assertions in linter
PR-URL: https://github.com/nodejs/node/pull/39924 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 10f8a41f34d..1e35e787057 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -17,6 +17,7 @@ const hacks = [
'eslint-plugin-node-core',
'eslint-plugin-markdown',
'@babel/eslint-parser',
+ '@babel/plugin-syntax-import-assertions',
];
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain);
@@ -36,6 +37,11 @@ module.exports = {
plugins: ['markdown', 'node-core'],
parser: '@babel/eslint-parser',
parserOptions: {
+ babelOptions: {
+ plugins: [
+ Module._findPath('@babel/plugin-syntax-import-assertions'),
+ ],
+ },
requireConfigFile: false,
sourceType: 'script',
},