如何避免 tslint 特定规则?
How to avoid tslint specific rule?
所以我处于一种情况,我希望特定的 class 能够禁用 max-classes-per-file。
但是我尝试添加规则 /* tslint:disable:max-classes-per-file: */
在文件的开头,但我仍然收到警告。
即使在我的 tsconfig.json 中执行 "exclude": [ "src/modules/Utils/Utils.tsx" ]
也不行。
我还在收到
web_1 | /usr/app/web/src/modules/Utils/Utils.tsx
web_1 | ERROR in /usr/app/web/src/modules/Utils/Utils.tsx(19,1):
web_1 | max-classes-per-file: A maximum of 1 class per file is allowed.
我是不是漏掉了什么?
您要找的评论是:
/* tslint:disable:max-classes-per-file */
注意最后缺少 :
。
所以我处于一种情况,我希望特定的 class 能够禁用 max-classes-per-file。
但是我尝试添加规则 /* tslint:disable:max-classes-per-file: */
在文件的开头,但我仍然收到警告。
即使在我的 tsconfig.json 中执行 "exclude": [ "src/modules/Utils/Utils.tsx" ]
也不行。
我还在收到
web_1 | /usr/app/web/src/modules/Utils/Utils.tsx
web_1 | ERROR in /usr/app/web/src/modules/Utils/Utils.tsx(19,1):
web_1 | max-classes-per-file: A maximum of 1 class per file is allowed.
我是不是漏掉了什么?
您要找的评论是:
/* tslint:disable:max-classes-per-file */
注意最后缺少 :
。