diff --git a/README.md b/README.md index e54687f..59ec133 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Typically we lint our javascript files using [Grunt](http://gruntjs.com/). We ha To add javascript linting to your project: - 1. add `mobify-code-style` to your package.json, or `npm install` it - 2. Create a [Gruntfile](http://gruntjs.com/sample-gruntfile) if you don't have one already - 3. In the initConfig of your gruntfile, add sections for jshint and/or jscs pointing to the correct linting file + 1. Install the NPM `mobify-code-style`, `grunt-contrib-jshint`, and `grunt-contrib-jscs` modules. + 2. Create a [Gruntfile](http://gruntjs.com/sample-gruntfile) if you don't have one already. + 3. In the initConfig of your gruntfile, add sections for jshint and/or jscs pointing to the correct linting file. Sample jshint config: @@ -19,6 +19,8 @@ jshint:{ dev: { src: ['src/**/*.js'], options: { + // The task fails if force is set to false. With true, it shows the + // linting errors, but continues force: false, jshintrc: 'node_modules/mobify-code-style/javascript/.jshintrc' }