简体   繁体   English

如何在Angular 2 Typescript的Webclipse中自定义格式警告?

[英]How to customize formatting warning in Webclipse for Angular 2 Typescript?

Webclipse gives a lot for formatting warning for the Typescript code, for example, for blank spaces and for using double quotes instead of single quotes. Webclipse提供了很多有关Typescript代码格式警告的信息,例如,空格和使用双引号而不是单引号的警告。 The latter one is annoying since using double quotes for strings is quite appropriate. 后者很烦人,因为对字符串使用双引号非常合适。

Is it possible to customize these warnings? 是否可以自定义这些警告?

It appeared that the Webclipse setting for warnings are in the file tslint.json in the root directory of the Angular application. 似乎警告的Webclipse设置位于Angular应用程序根目录下的文件tslint.json中。 The easiest way to change these settings is to use the Eclipse Quick Fix option, and then use the hint to remove this warning from tslint.json. 更改这些设置的最简单方法是使用Eclipse Quick Fix选项,然后使用提示从tslint.json中删除此警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM