mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
tools: add support for import source syntax in linter
PR-URL: https://github.com/nodejs/node/pull/56992 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
25b4a5d2fe
commit
a7f648c8ba
|
|
@ -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,
|
||||
|
|
|
|||
16
tools/eslint/package-lock.json
generated
16
tools/eslint/package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user