Is there an option for jscs and jshint in .jscsrc/.jshintrc to turn off linting for a directory?

193 Views Asked by At

I would like to disable linting for all files in a directory

For example

/
 some.js <-LINT
 noLint
   file1.js <- NO LINT
   file2.js <- NO LINT
   subDir
     file3.js <- NO LINT
1

There are 1 best solutions below

0
On

I don't think that is possible. For jscs, I can imagine you can create a jscsrc that effectively disables all default rules. For example:

{
    "validateLineBreaks": false,
    "disallowMultipleVarDecl": false,
    "validateIndentation": null
}

For jshint, you can try something similar:

{
    "browser": true,
    "jquery": true,
    "mocha": true,
    "node": true,

    "curly": false,
    "eqeqeq": false,
    "maxdepth": 99,
    "maxerr": 1000,
    "undef": false,
    "unused": false,
    "esversion": 6,
    "expr": true
}

So instead of disabling, you create settings that are as loose as possible.