2

In a specific part of my code I need to allow a string to longer that 120 characters.

I would like to disable for that line of code JSCS validation.

At the moment I get

JSCS: Line must be at most 120 characters

How to do it?

GibboK
  • 71,848
  • 143
  • 435
  • 658
  • A quick search suggested [maximumLineLength](http://jscs.info/rules.html) would be the rule you want to change. – Matt Burland Mar 18 '15 at 15:20
  • thanks, but it seems a global setting.... I need to make it works on a block of code only... not at global level. – GibboK Mar 18 '15 at 15:32

2 Answers2

12

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
GibboK
  • 71,848
  • 143
  • 435
  • 658
1

if you want to disable globally in your .jscsrc, just add "maximumLineLength": null to it.

joe
  • 1,359
  • 14
  • 19