Skip to content

Commit

Permalink
Switch jshint → eslint and lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
kswedberg committed Jul 6, 2019
1 parent 968bae7 commit 8fda8f9
Show file tree
Hide file tree
Showing 7 changed files with 727 additions and 272 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'kswedberg/es5',
};
13 changes: 0 additions & 13 deletions .jshintrc

This file was deleted.

34 changes: 16 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ module.exports = function(grunt) {
// Project configuration.
var gruntConfig = {
pkg: grunt.file.readJSON('package.json'),
jshint: {
eslint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>',
],
options: {
jshintrc: '.jshintrc',
},
},

},
// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp'],
Expand All @@ -38,33 +35,33 @@ module.exports = function(grunt) {
src: ['**'],
dest: 'tmp/',
filter: 'isFile',
expand: true
}]
}
expand: true,
}],
},
},

version: {
options: {
pkg: grunt.file.readJSON('test/fixtures/test-package.json')
pkg: grunt.file.readJSON('test/fixtures/test-package.json'),
},
// Not for testing. Run with grunt version:v:[release]
v: {
options: {
pkg: 'package.json'
pkg: 'package.json',
},
src: [
'package.json'
]
'package.json',
],
},
allFiles: {

}
},
},

// Unit tests.
nodeunit: {
tests: ['test/version-test.js'],
allFiles: ['test/version-all-test.js']
allFiles: ['test/version-all-test.js'],
},

};
Expand All @@ -77,7 +74,8 @@ module.exports = function(grunt) {
grunt.loadTasks('tasks');

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
// grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-copy');
Expand All @@ -87,7 +85,7 @@ module.exports = function(grunt) {

var testTasks = [
'clean',
'copy'
'copy',
];
var testTarget;

Expand All @@ -106,7 +104,7 @@ module.exports = function(grunt) {
'clean',
'copy',
'version::minor',
'nodeunit:allFiles'
'nodeunit:allFiles',
];

grunt.config.set('version', versionConfig);
Expand All @@ -119,6 +117,6 @@ module.exports = function(grunt) {
grunt.registerTask('test', testTasks);

// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test']);
grunt.registerTask('default', ['eslint', 'test']);

};
Loading

0 comments on commit 8fda8f9

Please sign in to comment.