Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 2e0f8bb

Browse files
author
fractaltheory
committed
Update README
1 parent 6ed7dd9 commit 2e0f8bb

1 file changed

Lines changed: 9 additions & 20 deletions

File tree

README.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,28 @@ A repo to document code standards for different languages and provide tools for
66

77
## JavaScript
88

9-
Typically we lint our javascript files using [Grunt](http://gruntjs.com/). We have two javascript linters with different features. [jshint](https://github.com/gruntjs/grunt-contrib-jshint) and [jscs](https://github.com/gustavohenke/grunt-jscs).
9+
Typically, we lint our javascript files using [Grunt](http://gruntjs.com/) and [grunt-eslint](https://github.com/sindresorhus/grunt-eslint). grunt-eslint is a Grunt helper for the [ESLint](http://eslint.org/) linter.
1010

1111
To add javascript linting to your project:
1212

13-
1. Install the NPM `mobify-code-style`, `grunt-contrib-jshint`, and `grunt-contrib-jscs` modules.
13+
1. Install the NPM `mobify-code-style` and `grunt-eslint` modules.
1414
2. Create a [Gruntfile](http://gruntjs.com/sample-gruntfile) if you don't have one already.
15-
3. In the initConfig of your gruntfile, add sections for jshint and/or jscs pointing to the correct linting file.
15+
3. In the initConfig of your gruntfile, add a section for eslint pointing to the correct linting file.
1616

17-
Sample jshint config:
17+
Sample eslint config:
1818

1919
```javascript
20-
jshint:{
20+
eslint:{
2121
dev: {
2222
src: ['src/**/*.js'],
2323
options: {
24-
// The task fails if force is set to false. With true, it shows the
25-
// linting errors, but continues
26-
force: false,
27-
jshintrc: 'node_modules/mobify-code-style/javascript/.jshintrc'
24+
// When true, eslint will test _only_ the rules set in the provided
25+
// configuration file
26+
reset: false,
27+
config: 'node_modules/mobify-code-style/javascript/.eslintrc'
2828
}
2929
}
3030
}
3131
```
32-
33-
Sample jscs config:
34-
35-
```javascript
36-
jscs: {
37-
options: {
38-
config: 'node_modules/mobify-code-style/javascript/.jscsrc'
39-
},
40-
src: ['src/**/*.js']
41-
}
42-
```
4332
## CSS
4433
Our Client Services team's [CSS Style Guide](/css/Readme.md). Written with a lot of tender care by @kpeatt and @jeffkamo.

0 commit comments

Comments
 (0)