系统相关
首页 > 系统相关> > windows系统批量转换CRLF和LF格式代码,解决eslint报错Delete `␍`解决'unix2dos' is not recognized as an internal

windows系统批量转换CRLF和LF格式代码,解决eslint报错Delete `␍`解决'unix2dos' is not recognized as an internal

作者:互联网

每天都要开心()哇:

在这里插入图片描述

最近写代码,工程配置为lf格式,但是拉取代码后,代码都变成了CRLF,于是满屏幕报错

解决方案如下:

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

for /R %G in (*.vue *.js *.ts *.svg *.json *.css *.scss) do dos2unix "%G" 
for /R %G in (*.vue *.js *.ts *.svg *.json *.css *.scss) do unix2dos "%G"

欢迎大家指出文章需要改正之处~
学无止境,合作共赢
(https://www.icode9.com/i/ll/?i=3b7fc14e670f4a0688459db76afd8dc1.png)

欢迎路过的小哥哥小姐姐们提出更好的意见哇~~

标签:LF,unix2dos,vue,js,报错,CRLF,格式
来源: https://www.cnblogs.com/sugartang/p/16454878.html