Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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'
}
Expand Down