【无标题】vue使用eslint报错 1:1 error Parsing error: Unexpected token < Parsing error: The keyword ‘impo
vue3使用eslint后每个组件/文件第一行都报错
1:1 error Parsing error: Unexpected token <
1:1 error Parsing error: The keyword 'import' is reserved
之所以报错是因为eslint配置错了导致解析的时候出错这样的报错是因为自己手贱把eslintrc的配置文件写成了.eslintrc.ts
这样eslint就会报这样的错应该是.eslintrc.js
2.使用vue3要用
'plugin:vue/vue3-essential'
解析
如果还是用了ts那么还要设置
parser: '@typescript-eslint/parser',
下面是我的一些配置
module.exports = {env: {browser: true,es2021: true,node: true},extends: ['plugin:vue/vue3-essential', //这里是个坑'airbnb-base','plugin:prettier/recommended','plugin:jest/recommended'],parserOptions: {ecmaVersion: 12,parser: '@typescript-eslint/parser',sourceType: 'module'},plugins: ['vue', '@typescript-eslint'],rules: {'import/no-unresolved': 'off','import/extensions': 'off','import/no-absolute-path': 'off','import/no-extraneous-dependencies': 'off','vue/no-multiple-template-root': 'off','no-param-reassign': ['error',{props: true,ignorePropertyModificationsFor: ['state', 'config']}]},settings: {}
}
【无标题】vue使用eslint报错 1:1 error Parsing error: Unexpected token < Parsing error: The keyword ‘impo相关推荐
- 【无标题】python类报错:takes no arguments
记录一下小错误 实例化类的时候,给类传参时报错takes no arguments,一种错误,网上基本都指出了 __init__ #正确 _init_ #错误 即问题出在初始化时候,__init__左 ...
- vue中eslint报错的解决方案
1,Newline required at end of file but not found. (eol-last) //文末需要一行 这个是报错: 这个是不报错的: 只需要在最后一行加上一空行即可 ...
- vue打包时候报错(压缩css错误) building for production...Error processing file: static/css/app.e8b75d3d19abc5bbb
报错信息如下 \ building for production...Error processing file: static/css/app.e8b75d3d19abc5bbbd9bd916f45 ...
- 【无标题】keil5打开报错
项目场景: GD32F205RGT6国产芯片项目 问题描述 keil5打开官方得例程后会出现报警问题: 导致找不到芯片,但是编译没问题就是看着不舒服,总觉得有问题. 原因分析: 其实是版本得问题,可能 ...
- 【无标题】磁盘处理报错IO error
1.首先检测下坏掉 badblocks -s -v -o bad.log /dev/sdb 将结果保存到bad.log 2. 逻辑坏道修复方法 ①.badblocks -s -w /dev/sdb E ...
- Vue项目初期报错问题记录大全
这里写自定义目录标题 Vue项目初期报错问题记录大全 1.vs终端无报错,浏览器加载空白,发现Cannot read properties of null (reading 'nextSibling' ...
- vue项目在vscode中编译eslint报错没显示红色波浪线提示
vue项目在vscode中编译eslint报错没显示红色波浪线提示. 如下图所示: 下图是预期效果: 不符合Eslint校验规则的代码位置都能展示出来,这样一目了然.能帮助我们迅速找到报错的位置. 然 ...
- Vue eslint 报错 eval can be harmful解决办法
现象:Vue eslint 报错 eval can be harmful var jsonObj = eval('('+jsonStr+')'); 想不明白,为什么搜索到的都是给eval加上函数指针? ...
- vue语法检查工具eslint报错小记(error Unexpected trailing comma、Extra semicolon、error ‘loadingInstance‘ is nev)
vue语法检查工具eslint报错小记 vue项目开发中开启语法检查工具eslint,尤其是接手别人的代码继续开发时,如果不注意语法习惯,项目运行时会出现一堆warning.error,乍一看就头大, ...
最新文章
- 智能改变未来,创新引领世界,第二届深圳国际人工智能展暨智能制造创新高峰论坛盛大启幕!
- 文件系统fsd hook (一)原理
- wxWidgets:wxGridSizeEvent类用法
- Vue - 去除控制台“你正在开发模式下运行Vue”的警告
- 音频编码:ADPCM
- uni app 调用网络打印机_uni-app封装一个request请求
- ansible软件模块参数
- 2.RabbitMQ实战 --- 理解消息通信
- JQuery获取和设置Select选项常用方法总结 (转)
- 计算机网络实验教程钱德沛_计算机网络实验教程完成版.pdf
- ArduinoUNO实战-第九章-光敏电阻或亮度传感器
- 【2021应用上架】超详细开发者账号申请应用上架审核经验整理
- [0ctf2016]piapiapia
- 美国薪资最高的技术技能:Golang、Kafka、DynamoDB、Redshift、Cassandra
- mysql rrd_将RRD数据库中数据导入MYSQL中_MySQL
- python 网格交易源码_文华财经网格交易源码
- Windows 10 系统更新后 vagrant up 报错:Error opening VBoxDrvStub: STATUS_OBJECT_NAME_NOT_FOUND
- Unit3D打包android时出错 CommandInvokationFailure: Unable to list target platforms. Please make sure the a
- tp5源码分析之网络请求
- win10家庭版下面修改配置host文件虚拟主机