jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

'requireTrailingComma' can not set false #150

Closed fyddaben closed 9 years ago

fyddaben commented 9 years ago

error info

requireTrailingComma: Missing comma before closing  curly brace at gulpfile.js :
    14 |  sass: ['src/*.scss'],
    15 |  destScripts: 'public/js',
    16 |  destLess: 'public/css'
--------------------------------^
    17 |};
    18 |

source code

var paths = {
       scripts: ['src/*.js'],
       sass: ['src/*.scss'],
       destScripts: 'public/js',
       destLess: 'public/css'
 };

my jscsrc

{
  "preset": "airbnb",
  "excludeFiles": ["node_modules/**"],
  "disallowMultipleVarDecl": "exceptUndefined",
  "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
  "requirePaddingNewLinesAfterBlocks": null,
  "maximumLineLength": 120
}

i set requireTrailingComma to false,but jscs --verbose ./ tell me ,

you should remove it or set true .

i dont konw whats wrong

qfox commented 9 years ago

I guess wrong repo?

Try to set it to null. http://jscs.info/overview#presets

You can specifically disable any preset rule by creating a .jscsrc config file and assigning it to null or false, like so: