Skip to content

Commit f6c15d9

Browse files
committed
Update Grunt & its plugins. Switch to eslint
1 parent 1136a50 commit f6c15d9

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'kswedberg/es5'
3+
};

Gruntfile.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/*global module:false*/
2-
31
module.exports = function(grunt) {
42
var pkg = grunt.file.readJSON('package.json');
53
var marked = require('marked');
@@ -94,12 +92,10 @@ module.exports = function(grunt) {
9492
}
9593
}
9694
},
97-
jscs: {
98-
src: 'src/**/*.js',
95+
eslint: {
96+
target: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
9997
options: {
100-
config: '.jscsrc',
101-
fix: true,
102-
verbose: true
98+
configFile: '.eslintrc.js',
10399
}
104100
},
105101
version: {
@@ -151,15 +147,15 @@ module.exports = function(grunt) {
151147
grunt.file.write('bower.json', JSON.stringify(json, null, 2));
152148
});
153149

154-
grunt.registerTask('lint', ['jshint', 'jscs']);
150+
grunt.registerTask('lint', ['eslint']);
155151
grunt.registerTask('build', ['lint', 'concat', 'version', 'updateBower', 'uglify', 'docs']);
156152
grunt.registerTask('default', ['build']);
157153

158154
['patch', 'minor', 'major'].forEach(function(release) {
159155
grunt.registerTask(release, ['lint', 'version:src:' + release, 'concat', 'uglify', 'version:banners:' + release, 'version:package:' + release, 'updateBower']);
160156
});
161157

162-
grunt.loadNpmTasks('grunt-jscs');
158+
grunt.loadNpmTasks('grunt-eslint');
163159
grunt.loadNpmTasks('grunt-contrib-jshint');
164160
grunt.loadNpmTasks('grunt-contrib-uglify');
165161
grunt.loadNpmTasks('grunt-contrib-concat');

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": {
88
"name": "Karl Swedberg",
99
"email": "kswedberg@gmail.com",
10-
"url": "http://www.learningjquery.com/"
10+
"url": "https://karlswedberg.com/"
1111
},
1212
"repository": {
1313
"type": "git",
@@ -22,15 +22,17 @@
2222
"jquery": ">=1.7.0"
2323
},
2424
"devDependencies": {
25-
"grunt": "^0.4.5",
26-
"grunt-contrib-concat": "^0.5.1",
27-
"grunt-contrib-jshint": "^0.11.3",
28-
"grunt-contrib-uglify": "^0.11.0",
29-
"grunt-contrib-watch": "^0.6.1",
30-
"grunt-jscs": "^2.5.0",
31-
"grunt-shell": "^1.1.2",
32-
"grunt-version": "^1.0.0",
33-
"marked": "^0.3.5",
25+
"eslint-config-kswedberg": "^1.3.0",
26+
"grunt": "^1.0.1",
27+
"grunt-contrib-concat": "^1.0.1",
28+
"grunt-contrib-jshint": "^1.1.0",
29+
"grunt-contrib-uglify": "^2.3.0",
30+
"grunt-contrib-watch": "^1.0.0",
31+
"grunt-eslint": "^19.0.0",
32+
"grunt-shell": "^2.1.0",
33+
"grunt-version": "^1.1.1",
34+
"lodash": "^4.17.4",
35+
"marked": "^0.3.6",
3436
"node-syntaxhighlighter": "^0.8.1",
3537
"qunitjs": "^1.20.0"
3638
},

0 commit comments

Comments
 (0)