为了在JSHint中关闭特定行的衬垫规则,我们使用以下规则:
/* jshint ignore:start*/
$scope.someVar = ConstructorFunction();
/* jshint ignore:end */
我一直在努力为eslint找到与上述内容类似的内容.
为了在JSHint中关闭特定行的衬垫规则,我们使用以下规则:
/* jshint ignore:start*/
$scope.someVar = ConstructorFunction();
/* jshint ignore:end */
我一直在努力为eslint找到与上述内容类似的内容.
要禁用下一行,请执行以下操作:
// eslint-disable-next-line no-use-before-define
var thing = new Thing();
或者使用单行语法:
var thing = new Thing(); // eslint-disable-line no-use-before-define
看到eslint docs了吗