JSCS line to long, when its not

120 Views Asked by At

I'm using JSCS with the airbnb preset (looked at switching to eslint for felt harder to get the style we wanted).

JSCS throw this error

    maximumLineLength: Line must be at most 100 characters at ./src/AbstractClient.es6 :
     1 |define(['underscore',
--------^
     2 |    'backbone',
     3 |    'som/models/Model',],

Line 1 is not more than 100 charaters, fact if I add a ')' to the line it stops complaining (starts complaing elsewhere).

I've googled and have not found anything like this. Currently, I have removed the line length check but would like to add it back in.

1

There are 1 best solutions below

0
Garrett On BEST ANSWER

Apparently, the indentation of arrays is not excluded from the maximumLineLength,

More information found here: https://github.com/jscs-dev/node-jscs/issues/424

For now, wrap your code with

// jscs:disable
... code here
// jscs:enable