当前位置: 首页 > 文档资料 > FECS 中文文档 >

Format

优质
小牛编辑
119浏览
2023-12-01

代码格式化

用法

$ fecs format [target...]

$ fecs format [target...] --type=js,css

说明

使用 eslintesformatter当前目录 下所有 JavaScript 代码进行格式化。 使用 csscomb当前目录 下所有 CSS 代码进行格式化。 使用 https://www.xnip.cn/shouce/1124/72638.html当前目录 下所有 HTML 代码进行格式化。

更多信息

参见 FECS 命令参数

注意事项

  • 格式化后的代码默认保存在当前目录下的 output 内,如需替换,请使用 --replace 参数
  • 默认格式并且仅使用 https://www.xnip.cn/doc/fecs-ESFormatter,如需使用 https://www.xnip.cn/doc/fecs-ESLint 的 fix,请使用 --fix 参数。