Editorconfig 有助于跨各种编辑器和 IDE 为处理同一项目的多个开发人员维护一致的编码样式。
根据项目需要,Eslint 和 .editorconfig 并不冲突,同时配合使用可以使代码风格更加优雅。
创建 .editorconfig
,示例内容如下
editorconfig# http://editorconfig.org root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true quote_type = single [*.md] insert_final_newline = false trim_trailing_whitespace = false
本文作者:任浪漫
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-ND 4.0 许可协议。转载请注明出处!