报错Errors: http://eslint.org/docs/rules/*

本文详细解析了ESLint中常见的四种错误:文档末尾未换行、注释后未跟空格、缩进错误及tab缩进错误,并提供了包括格式化文件、逐个修改文件、关闭规则校验及关闭ESLint功能在内的多种解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1、报错解释

       Errors:
         1.http://eslint.org/docs/rules/eol-last    表示:文档末尾要换行;

       Errors:
         2  http://eslint.org/docs/rules/spaced-comment   表示: // 注释后要跟空格。

      Errors:
         3  http://eslint.org/docs/rules/indent    表示:缩进错误,设置'indent':0,

      Errors:
         4  http://eslint.org/docs/rules/no-tabs    表示:tab缩进错误

2、报错原因

       文件编码的代码,不符合eslint的语法校验规则

3、解决方案

(1)方案一:相关文件进行格式化(以上错误推荐使用该方法)

(2)方案二:一个个修改文件的格式,符合eslint的语法校验规则为止(过于麻烦费时);

         方案三:关闭相关的规则校验(一般);

         方案四:关闭eslint的语法校验功能(不推荐使用);

案例链接如下:https://blog.youkuaiyun.com/PGY0000/article/details/85258292

ERROR [vite-plugin-eslint] 13:20:32 D:\documents\dataease\core\core-frontend\src\pages\panel\main.ts 90:13 error Insert `,` prettier/prettier 141:19 error Insert `,` prettier/prettier ✖ 2 problems (2 errors, 0 warnings) 2 errors and 0 warnings potentially fixable with the `--fix` option. file: D:/documents/dataease/core/core-frontend/src/pages/panel/main.ts ERROR error during build: 13:20:32 RollupError: D:\documents\dataease\core\core-frontend\src\pages\panel\main.ts 90:13 error Insert `,` prettier/prettier 141:19 error Insert `,` prettier/prettier ✖ 2 problems (2 errors, 0 warnings) 2 errors and 0 warnings potentially fixable with the `--fix` option. at error (file:///D:/documents/dataease/core/core-frontend/node_modules/rollup/dist/es/shared/node-entry.js:2287:30) at Object.error (file:///D:/documents/dataease/core/core-frontend/node_modules/rollup/dist/es/shared/node-entry.js:25351:20) at Object.error (file:///D:/documents/dataease/core/core-frontend/node_modules/rollup/dist/es/shared/node-entry.js:24472:42) at Object.transform (D:\documents\dataease\core\core-frontend\node_modules\vite-plugin-eslint\dist\index.js:1:2469) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async transform (file:///D:/documents/dataease/core/core-frontend/node_modules/rollup/dist/es/shared/node-entry.js:24449:16) at async ModuleLoader.addModuleSource (file:///D:/documents/dataease/core/core-frontend/node_modules/rollup/dist/es/shared/node-entry.js:24649:30)
03-15
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值