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'
}
阅读 2310 · 发布于 2022-06-12
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
走进 Rust:所有权阅读 2127
-
Android ListView 隐藏分割线阅读 2553
-
Linux xxx is not in the sudoers file.This incident will be reported阅读 2611
-
JMeter 当前接口请求失败停止请求下一个接口阅读 2760
-
Keycloak 登录时展示 Consent 授权告知页面阅读 32
-
IDEA go mod Unresolved Dependency阅读 134
-
OpenResty 中的正则匹配和替换阅读 7832
-
Java jps 无法显示进程 id阅读 449
-
Nginx 配置之开启状态检查阅读 2424
-
Spring Boot 单元测试 @WebMvcTest 对 Controller 进行单独测试阅读 1004