npm install --save-dev coffeelint coffeelint-config-suddi
- Add the CoffeeLint config to your
package.json, for running on your CoffeeScript code:
{
"scripts": {
"lint": "coffeelint ."
},
"devDependencies": {
"coffeelint": "^2.1.0",
"coffeelint-config-suddi": "^3.0.0"
},
"coffeelintConfig": {
"extends": "coffeelint-config-suddi"
}
}- Then apply the linter with
npm run lint.
NOTE: You will likely want to include a .coffeelintignore file, as coffeelint, by default will include all .coffee files including those inside of node_modules:
echo "node_modules" > .coffeelintignore