是否有任何工具可以为 Typescript 添加空格?
Is there any tool for adding white spaces for Typescript?
我正在将一些代码从 JS 迁移到 Typescript。并且对有关空格的错误感到非常恼火。
喜欢评论后的空格,左右等号。
我理解的还不错,很有道理。
但我认为有一个用于空白的自动化工具或插件。
请给我一个好的解决方案。
[00:15:40] [gulp-tslint] error app/world/world.component.ts[53, 20]: missing whitespace
And quite annoyed by errors about white spaces. Like spaces after comments, and around a equal.
TypeScript 不会在这些上出错。也许您正在使用 tslint
.
修复
- 禁用 tslint 或
- 使用 grunt 清理:https://www.npmjs.com/package/grunt-trimtrailingspaces 或
- Atom 编辑器默认执行此操作。
我正在将一些代码从 JS 迁移到 Typescript。并且对有关空格的错误感到非常恼火。 喜欢评论后的空格,左右等号。
我理解的还不错,很有道理。 但我认为有一个用于空白的自动化工具或插件。 请给我一个好的解决方案。
[00:15:40] [gulp-tslint] error app/world/world.component.ts[53, 20]: missing whitespace
And quite annoyed by errors about white spaces. Like spaces after comments, and around a equal.
TypeScript 不会在这些上出错。也许您正在使用 tslint
.
修复
- 禁用 tslint 或
- 使用 grunt 清理:https://www.npmjs.com/package/grunt-trimtrailingspaces 或
- Atom 编辑器默认执行此操作。