前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >vue3报错 ERROR Failed to compile with 1 errorYou may use special comments to disab

vue3报错 ERROR Failed to compile with 1 errorYou may use special comments to disab

原创
作者头像
肥晨
发布2023-04-04 14:29:03
8831
发布2023-04-04 14:29:03
举报
文章被收录于专栏:农民工前端农民工前端

问题描述

代码语言:css
复制
 ERROR  Failed to compile with 1 error                                                                                                                                                                  16:17:24

[eslint]
C:\Users\xuhuichen\Desktop\gpyh-ec-wx-front\src\components\a1.vue
  1:1  error  Component name "a1" should always be multi-word  vue/multi-word-component-names

✖ 1 problem (1 error, 0 warnings)


You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in [eslint]
C:\Users\xuhuichen\Desktop\gpyh-ec-wx-front\src\components\a1.vue
  1:1  error  Component name "a1" should always be multi-word  vue/multi-word-component-names

✖ 1 problem (1 error, 0 warnings)

解决方法

思路

这么多错 全都是因为eslint严格格式

关闭eslint严格格式就好

方法

直接在根目录下创建vue.config.js文件,关键代码<b>lintOnSave: false,</b>

代码语言:css
复制
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  lintOnSave: false,
})

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题描述
  • 解决方法
    • 思路
      • 方法
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档