简体   繁体   English

如何将 tslint 配置为在变量名中下划线时不引发警告?

[英]How can i configure tslint to not throw warning when underscore in a variable name?

How can i configure tslint to not throw warning when underscore in a variable name in typescript?如何将 tslint 配置为在 typescript 中的变量名中下划线时不引发警告?

For Example:例如:

interface MyInterface{ USER_ID:number }接口 MyInterface{ USER_ID:number }

This throw "variable name must be in lowerCamelCase or UPPER_CASE" error....I cant change the variable name....这会抛出“变量名必须为 lowerCamelCase 或 UPPER_CASE”错误....我无法更改变量名....

You can either the rule variable-name on your tslint.json, or better configure it to suit your specific needs (See the check-format argument for further info)您可以在 tslint.json 上使用规则变量名,或者更好地配置它以满足您的特定需求(有关详细信息,请参阅检查格式参数)

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

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