Skip to content

Commit f621c81

Browse files
committed
Replaced jshint with eslint for standards checking. Note: Code does not currently pass the standard and given the age and amount of code actually passing will take some additional time and come at a later date.
This references issue #244
1 parent 3c96800 commit f621c81

4 files changed

Lines changed: 28 additions & 18 deletions

File tree

.eslintrc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true
5+
},
6+
"extends": "eslint:recommended",
7+
"rules": {
8+
"indent": [
9+
"error",
10+
4
11+
],
12+
"linebreak-style": [
13+
"error",
14+
"unix"
15+
],
16+
"semi": [
17+
"error",
18+
"always"
19+
],
20+
"no-undef": 0,
21+
"no-redeclare": 0
22+
}
23+
}

.jshintrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

Gruntfile.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
module.exports = function (grunt) {
33
grunt.initConfig({
44
pkg: grunt.file.readJSON('./package.json'),
5-
jshint: {
6-
options: {
7-
jshintrc: '.jshintrc'
8-
},
9-
all: ['Standards/**/*.js', 'Contrib/PhantomJS/*.js']
5+
eslint: {
6+
target: ['Standards/**/*.js', 'Contrib/PhantomJS/*.js']
107
},
118
uglify: {
129
debug: {
@@ -68,19 +65,13 @@ module.exports = function (grunt) {
6865
}
6966
]
7067
}
71-
},
72-
watch: {
73-
jade: {
74-
files: ['<%= jshint.all %>'],
75-
tasks: ['jshint:all']
76-
}
7768
}
7869
});
7970

8071
grunt.file.setBase('./');
8172
require('load-grunt-tasks')(grunt);
8273

83-
grunt.registerTask('default', ['jshint']);
74+
grunt.registerTask('default', ['eslint']);
8475
grunt.registerTask('build', ['uglify:dist', 'copy:dist']);
8576
grunt.registerTask('build-bookmarklet', ['uglify:bookmarklet', 'copy:dist']);
8677

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
},
2121
"homepage": "http://squizlabs.github.io/HTML_CodeSniffer/",
2222
"dependencies": {
23-
"grunt": "^1.0.0",
23+
"grunt": "^1.0.3",
2424
"grunt-contrib-copy": "^1.0.0",
25-
"grunt-contrib-jshint": "^1.0.0",
2625
"grunt-contrib-watch": "^1.0.0",
26+
"grunt-eslint": "^21.0.0",
2727
"load-grunt-tasks": "^3.5.2"
2828
},
2929
"devDependencies": {

0 commit comments

Comments
 (0)