Permalink
Browse files

Merge pull request #1534 from markelog/eslint r=vladikoff,shama

Fixes #1533
1 parent 29c506c commit f1524025c1e432f35025986ac3efbb29a054bbc6 @markelog markelog committed with vladikoff Jul 19, 2016
Showing with 24 additions and 48 deletions.
  1. +4 −0 .eslintrc
  2. +0 −5 .jscsrc
  3. +0 −14 .jshintrc
  4. +9 −21 Gruntfile.js
  5. +3 −6 lib/grunt/task.js
  6. +2 −2 package.json
  7. +6 −0 test/.eslintrc
View
@@ -0,0 +1,4 @@
+{
+ "extends": "grunt",
+ "root": true
+}
View
@@ -1,5 +0,0 @@
-{
- "preset": "grunt",
- // Nullified until the files in test/ can be cleaned
- "maximumLineLength": null
-}
View
@@ -1,14 +0,0 @@
-{
- "boss": true,
- "curly": true,
- "eqeqeq": true,
- "eqnull": true,
- "immed": true,
- "latedef": "nofunc",
- "newcap": true,
- "noarg": true,
- "node": true,
- "sub": true,
- "undef": true,
- "unused": true
-}
View
@@ -14,34 +14,23 @@ module.exports = function(grunt) {
}
}
},
- jshint: {
+ eslint: {
gruntfile_tasks: ['Gruntfile.js', 'internal-tasks/*.js'],
libs_n_tests: ['lib/**/*.js', '<%= nodeunit.all %>'],
- subgrunt: ['<%= subgrunt.all %>'],
- options: {
- jshintrc: '.jshintrc'
- }
- },
- jscs: {
- src: [
- 'lib/**/*.js',
- 'internal-tasks/**/*.js',
- 'test/**/*.js',
- '!test/fixtures/**/*.js'
- ]
+ subgrunt: ['<%= subgrunt.all %>']
},
watch: {
gruntfile_tasks: {
- files: ['<%= jshint.gruntfile_tasks %>'],
- tasks: ['jshint:gruntfile_tasks']
+ files: ['<%= eslint.gruntfile_tasks %>'],
+ tasks: ['eslint:gruntfile_tasks']
},
libs_n_tests: {
- files: ['<%= jshint.libs_n_tests %>'],
- tasks: ['jshint:libs_n_tests', 'nodeunit']
+ files: ['<%= eslint.libs_n_tests %>'],
+ tasks: ['eslint:libs_n_tests', 'nodeunit']
},
subgrunt: {
files: ['<%= subgrunt.all %>'],
- tasks: ['jshint:subgrunt', 'subgrunt']
+ tasks: ['eslint:subgrunt', 'subgrunt']
}
},
subgrunt: {
@@ -50,8 +39,7 @@ module.exports = function(grunt) {
});
// These plugins provide necessary tasks.
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-jscs');
+ grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-watch');
@@ -60,7 +48,7 @@ module.exports = function(grunt) {
// "npm test" runs these tasks
grunt.registerTask('test', '', function(reporter) {
- grunt.task.run(['jshint', 'jscs', 'nodeunit:' + (reporter || 'all'), 'subgrunt']);
+ grunt.task.run(['eslint', 'nodeunit:' + (reporter || 'all'), 'subgrunt']);
});
// Default task.
View
@@ -1,5 +1,8 @@
'use strict';
+// Keep track of the number of log.error() calls and the last specified tasks message.
+var errorcount, lastInfo;
+
var grunt = require('../grunt');
// Nodejs libs.
@@ -14,15 +17,9 @@ var task = module.exports = Object.create(parent);
// A temporary registry of tasks and metadata.
var registry = {tasks: [], untasks: [], meta: {}};
-// The last specified tasks message.
-var lastInfo;
-
// Number of levels of recursion when loading tasks in collections.
var loadTaskDepth = 0;
-// Keep track of the number of log.error() calls.
-var errorcount;
-
// Override built-in registerTask.
task.registerTask = function(name) {
// Add task to registry.
View
@@ -56,10 +56,10 @@
},
"devDependencies": {
"difflet": "~0.2.3",
- "grunt-contrib-jshint": "~1.0.0",
+ "eslint-config-grunt": "^1.0.1",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-contrib-watch": "~1.0.0",
- "grunt-jscs": "~2.8.0",
+ "grunt-eslint": "^18.0.0",
"semver": "2.1.0",
"shelljs": "~0.5.3",
"temporary": "~0.0.4",
View
@@ -0,0 +1,6 @@
+{
+ "rules": {
+ // Nullified until the files in test/ can be cleaned
+ "max-len": "off"
+ }
+}

0 comments on commit f152402

Please sign in to comment.