All arguments are optional. By default gulp-coffeelint will walk up the directory tree looking for a coffeelint.json (per file, i.e. dirname) or a package.json that has a coffeelintConfig object (as the cli does). Also, .litcoffee and .coffee.md files will be treated as Literate CoffeeScript.
optFile
Type: String
Absolute path of a json file containing options for coffeelint.
opt
Type: Object
Options you wish to send to coffeelint. If optFile is given, this will be ignored.
file.coffeelint.success=true;// if no errors were found, false otherwisefile.coffeelint.errorCount=0;// number of errors returned by `coffeelint`file.coffeelint.warningCount=0;// number of warnings returned by `coffeelint`file.coffeelint.results=ErrorReportObject;// instance of `Coffeelint::ErrorReport` , see https://github.com/clutchski/coffeelint/blob/master/src/error_report.coffeefile.coffeelint.opt={};// the options used by `coffeelint`file.coffeelint.literate=false;// you guessed it
Reporters
name
Type: String, Function
Default: 'coffeelint-stylish'
Any module following the CoffeeLint Reporter module format should work. These modules have a constructor accepting a CoffeeLint::ErrorReport Object, and provide a publish function.
Fail and FailOnWarning Reporters
Do you want the task to fail when a CoffeeLint error or warning happens? gulp-coffeelint includes fail and failOnWarning reporters for this.
This example will log the errors using the stylish reporter, then fail if CoffeeLint was not a success.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using gulp and npm-test. Plus, make sure to adhere to these commit message conventions.
请发表评论