[英]How to disable JSCS validation for a specific part of code: Line must be at most 120 characters
In a specific part of my code I need to allow a string to longer that 120 characters. 在我的代码的特定部分,我需要允许一个字符串超过120个字符。
I would like to disable for that line of code JSCS validation. 我想禁用那行代码JSCS验证。
At the moment I get 目前我得到了
JSCS: Line must be at most 120 characters
How to do it? 怎么做?
I found a solution using this 我发现了一个解决方案
//jscs:disable maximumLineLength
..long code here
//jscs:enable maximumLineLength
Ignore all rules at file level 忽略文件级别的所有规则
//jscs:disable
Ignore specific rule at file level 忽略文件级别的特定规则
//jscs:disable specificRule
如果要在.jscsrc
全局禁用,只需将"maximumLineLength": null
添加到它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.