Skip to content

Commit a7f648c

Browse files
authored
tools: add support for import source syntax in linter
PR-URL: #56992 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 25b4a5d commit a7f648c

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

eslint.config.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import nodeCore from './tools/eslint/eslint-plugin-node-core.js';
1717
const js = requireEslintTool('@eslint/js');
1818
const babelEslintParser = requireEslintTool('@babel/eslint-parser');
1919
const babelPluginSyntaxImportAttributes = resolveEslintTool('@babel/plugin-syntax-import-attributes');
20+
const babelPluginSyntaxImportSource = resolveEslintTool('@babel/plugin-syntax-import-source');
2021
const jsdoc = requireEslintTool('eslint-plugin-jsdoc');
2122
const markdown = requireEslintTool('eslint-plugin-markdown');
2223
const stylisticJs = requireEslintTool('@stylistic/eslint-plugin-js');
@@ -74,6 +75,7 @@ export default [
7475
babelOptions: {
7576
plugins: [
7677
babelPluginSyntaxImportAttributes,
78+
babelPluginSyntaxImportSource,
7779
],
7880
},
7981
requireConfigFile: false,

tools/eslint/package-lock.json

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/eslint/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"@babel/core": "^7.26.7",
77
"@babel/eslint-parser": "^7.26.5",
88
"@babel/plugin-syntax-import-attributes": "^7.26.0",
9+
"@babel/plugin-syntax-import-source": "^7.25.9",
910
"@stylistic/eslint-plugin-js": "^3.0.1",
1011
"eslint": "^9.19.0",
1112
"eslint-formatter-tap": "^8.40.0",

0 commit comments

Comments
 (0)