首页 > 其他分享 >Delete `␍`eslint(prettier/prettier) 错误

Delete `␍`eslint(prettier/prettier) 错误

时间:2023-01-28 17:33:41浏览次数:61  
标签:indent prettier eslint EditorConfig false Delete

拉完代码之后所有行尾报错Delete ,查询了一下,是因为mac和windows换行符差异问题,最简单的方法是在根目录下添加.editorconfig文件,大概是个统一缩进符、换行符之类的代码风格的文件,然后重启一下ide生效。

部分ide需要额外安装插件,比如vs code可以装个EditorConfig for VS Code。

# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false

标签:indent,prettier,eslint,EditorConfig,false,Delete
From: https://www.cnblogs.com/yiyuzi/p/17070952.html

相关文章