Search code examples
javascriptjshintjscs

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.

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?


Solution

  • 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