Files
BlueRoseNote/03-UnrealEngine/流程管理与部署/版本管理/Delete `cr`eslint(prettier prettier) 错误的解决方案.md

20 lines
582 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Untitled
date: 2025-09-22 19:59:41
excerpt:
tags:
rating: ⭐
---
# 前言
https://juejin.cn/post/6844904069304156168
# 原因
代码是在其他系统,换行符不同导致。
# 修复方法
1. 执行yarn run lint --fix需要Commit所有文件。
2. 修改.prettierrc文件 在项目根目录下的.prettierrc文件中写入即可。
1. 其实就是不让prettier检测文件每行结束的格式添加 `"endOfLine": "auto"`
3. IDE修复vscode底部有切换LF => CR LF
4. git设置
可以使用`git config --global core.autocrlf false`来解决问题。