通过注释修改代码的coffeelint规则

pau*_*ani 9 lint coffeescript coffeelint

是否可以添加一些注释来忽略或修改某个块上的coffeeling规则(缩进)?

我在脚本上使用了最多80列的规则,但是我有一些超过该值的objetc的字符串值,并且打破这些行会使代码更糟糕.

例:

##
# @coffeelint ignore max_line_length
##
object:
  attr: "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width"
Run Code Online (Sandbox Code Playgroud)

Asa*_*ers 22

这是语法.

 # coffeelint: disable=max_line_length
 object:
   attr: "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width"
 # coffeelint: enable=max_line_length
Run Code Online (Sandbox Code Playgroud)