IDEA ESLint: Delete `␍` (prettier/prettier) 解决办法
IDEA ESLint 大约 472 字警告原因
由于行尾风格配置导致。
endOfLine
配置有以下四个选项:
lf
:仅换行(\n
),常见于Linux
和macOS
以及git repos
内部crlf
:回车 + 换行字符(\r\n
),常见于Windows
cr
:仅回车字符(\r
),很少使用auto
:保持现有的行尾(一个文件中的混合值通过查看第一行之后使用的内容进行标准化)
解决办法
.prettier.js
或prettier.config.js
中添加endOfLine: 'auto'
。
module.exports = {
tabWidth: 2, // indent width 缩进 2 个空格数
semi: false, // ending semicolon 末尾不能使用分号
singleQuote: true, // single quote 字符串必须使用单引号
trailingComma: 'all', // trailing comma 末尾逗号
// 重点是这一个要配置为 auto
endOfLine: 'auto'
}
阅读 1436 · 发布于 2022-06-12
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Chrome 打包插件 - Windows 平台阅读 1292
-
Kubernetes 包管理器 Helm阅读 882
-
RabbitMQ 更换日志和数据存储目录阅读 3006
-
IDEA 使用 Kubernetes 瑞士军刀 Telepresence 进行网络代理阅读 571
-
Docker 容器间网络通讯阅读 914
-
Git 命令之暂存区阅读 2218
-
Linux中/bin、/sbin、/usr/bin、/usr/sbin、/usr/local/bin、/usr/local/sbin 目录的含义及区别阅读 1273
-
IDEA 使用 Swing Explorer 调试 Swing 和 AWT阅读 2138
-
VisualVM 监控注册成 Windows 服务的 Tomcat 之 JMX 方式阅读 1474
-
算法:快速排序阅读 1309