Skip to content

Commit

Permalink
tools: add support for import assertions in linter
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
aduh95 committed Oct 14, 2021
1 parent bf82dcd commit 2cbfc9f
Show file tree
Hide file tree
Showing 26 changed files with 346 additions and 2,429 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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',
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2cbfc9f

Please sign in to comment.