You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+9-20Lines changed: 9 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,28 @@ A repo to document code standards for different languages and provide tools for
6
6
7
7
## JavaScript
8
8
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.
10
10
11
11
To add javascript linting to your project:
12
12
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.
14
14
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.
16
16
17
-
Sample jshint config:
17
+
Sample eslint config:
18
18
19
19
```javascript
20
-
jshint:{
20
+
eslint:{
21
21
dev: {
22
22
src: ['src/**/*.js'],
23
23
options: {
24
-
//The task fails if force is set to false. With true, it shows the
0 commit comments