vue运行报错ESLint: ‘event‘ is defined but never used.(no-unused-vars)
Vue 报错 运行 is No Event defined but
2023-09-14 09:04:07 时间
百度了一下。是ESLint检查规则的问题。说要在.eslintrc.js文件里去设置规则、
我是用vuecli4搭建的项目。里面没有生产.eslintrc.js所以自己新建了一个。
关键代码:
rules: { "no-unused-vars":"off" }
.eslintrc.js文件:
module.exports = {
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
rules: {
"no-unused-vars":"off"
}
}
Vue中ESlint配置文件eslintrc.js文件
参考资料:
https://blog.csdn.net/sinat_37680470/article/details/79716331
https://blog.csdn.net/qq_40259641/article/details/103197226
https://blog.csdn.net/weixin_38606332/article/details/80864381
相关文章
- 手把手写一个Vue-router,无惧面试官的vueRoute题目
- 用vue实现入库单的打印「建议收藏」
- Vue中显示img图片,显示不出来怎么办?vue显示图片
- vue前端怎么导出图片_VUE中将页面导出为图片或者PDF
- codeblocks批量注释快捷键_vue多行注释快捷键
- Vs Code报错vue/multi-word-component-names
- vue报错cannot read property_vue3 ref 数组
- VUE双向绑定原理_vue的数据绑定怎么实现
- 记录关于Vue+element-ui的系列问题
- 一起吹过的晚风就算相拥 — Vue Admin Work 与 Pinia的邂逅相拥---Pinia实战篇
- Vue 图片预加载
- 创建一个vue项目并配置默认页面
- 在网页文档中引入Vue.js的方法有哪些?_vue直接引入js文件没有用
- vue 分页组件_bootstrap 分页
- vue生成二维码并保存图片_vue实现扫描二维码
- vue3 报错解决:找不到模块‘xxx.vue’或其相应的类型声明。(Vue 3 can not find module)
- 【Web技术】1445- 如何使用 Hooks 写出高质量的 React 和 Vue 组件?
- 前端三大框架之Vue-day04
- Vue style里面使用@import引入外部css, 作用域是全局的解决方案
- Vue整合Echarts报错:“TypeError: Cannot read properties of undefined (reading ‘init‘)“
- vue自定义指令实现长按功能
- 安装Vue on Linux:轻松搭建开发环境(linux安装vue)
- linux下快速部署Vue项目(linux部署vue)
- Vue 实现前后端分离,安全连接 MSSQL 数据库(vue 连接mssql)
- Vue用Redis储存获取数据(vue获取redis)
- Vue搭配Redis做针对性取值(vue redis取值)