Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork530
Closed
Labels
Description
Describe the bug
1.创建一个vite-vue模板项目,安装eslint相关
npm create vite@latest my-vue-app -- --template vuenpx @antfu/eslint-config@latestnpm i
- 在<script>中写一个未使用的方法
- 控制台执行npx eslint报错:
TypeError: Cannot destructure property 'parent' of 'node' as it is undefined.Occurred while linting D:\JetBrains\Projects\1\my-vue-app\src\App.vue:2Rule: "unused-imports/no-unused-imports" at exports.unusedImportsPredicate (D:\JetBrains\Projects\1\my-vue-app\node_modules\@antfu\eslint-config\node_modules\eslint-plugin-unused-imports\lib\rules\predicates.js:28:13) at Object.value [as report] (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint-rule-composer\lib\rule-composer.js:144:25) at Program:exit (D:\JetBrains\Projects\1\my-vue-app\node_modules\@antfu\eslint-config\node_modules\@typescript-eslint\eslint-plugin\dist\rules\no-unused-vars.js:301:33) at ruleErrorHandler (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\linter.js:1115:48) at D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\safe-emitter.js:45:58 at Array.forEach (<anonymous>) at Object.emit (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\safe-emitter.js:45:38) at NodeEventGenerator.applySelector (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\node-event-generator.js:297:26) at NodeEventGenerator.applySelectors (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\node-event-generator.js:326:22) at NodeEventGenerator.leaveNode (D:\JetBrains\Projects\1\my-vue-app\node_modules\eslint\lib\linter\node-event-generator.js:349:14)
Reproduction
https://stackblitz.com/edit/vitejs-vite-g2jfea?file=src%2FApp.vue&view=editor
System Info
System: OS: Windows 10 10.0.19045 CPU: (8) x64 12th Gen Intel(R) Core(TM) i3-12100 Memory: 5.31 GB / 15.59 GB Binaries: Node: 20.12.2 - D:\nvm\nodejs\node.EXE npm: 10.5.0 - D:\nvm\nodejs\npm.CMD Browsers: Edge: Chromium (124.0.2478.51) Internet Explorer: 11.0.19041.3636
Used Package Manager
npm
Validations
- Follow ourCode of Conduct
- Read theContributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is aminimal reproducible of the bug.