diff --git a/eslint.config.mjs b/eslint.config.mjs index ef195d0c60a955..912d32655720fe 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,6 +17,7 @@ import nodeCore from './tools/eslint/eslint-plugin-node-core.js'; const js = requireEslintTool('@eslint/js'); const babelEslintParser = requireEslintTool('@babel/eslint-parser'); const babelPluginSyntaxImportAttributes = resolveEslintTool('@babel/plugin-syntax-import-attributes'); +const babelPluginSyntaxImportSource = resolveEslintTool('@babel/plugin-syntax-import-source'); const jsdoc = requireEslintTool('eslint-plugin-jsdoc'); const markdown = requireEslintTool('eslint-plugin-markdown'); const stylisticJs = requireEslintTool('@stylistic/eslint-plugin-js'); @@ -74,6 +75,7 @@ export default [ babelOptions: { plugins: [ babelPluginSyntaxImportAttributes, + babelPluginSyntaxImportSource, ], }, requireConfigFile: false, diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index e64259446ee300..4e962b52833be5 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -11,6 +11,7 @@ "@babel/core": "^7.26.7", "@babel/eslint-parser": "^7.26.5", "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-import-source": "^7.25.9", "@stylistic/eslint-plugin-js": "^3.0.1", "eslint": "^9.19.0", "eslint-formatter-tap": "^8.40.0", @@ -237,6 +238,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-import-source": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-source/-/plugin-syntax-import-source-7.25.9.tgz", + "integrity": "sha512-LlPeWMhPqu2YV1LADbJ0aSXxxfEIszdjB6k2Ih+p8c/slDAygf8Iy2FO9QO55APNTj5kamdf8CKXvg7OXngt8Q==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/template": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", diff --git a/tools/eslint/package.json b/tools/eslint/package.json index cdc2cc75dc57e2..25051af87fb70a 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -6,6 +6,7 @@ "@babel/core": "^7.26.7", "@babel/eslint-parser": "^7.26.5", "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-import-source": "^7.25.9", "@stylistic/eslint-plugin-js": "^3.0.1", "eslint": "^9.19.0", "eslint-formatter-tap": "^8.40.0",