diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 8026d53f744..00000000000 --- a/.jshintignore +++ /dev/null @@ -1,3 +0,0 @@ -dist/**/* -external/**/* -ui/vendor/**/* diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index e79eeee472e..00000000000 --- a/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "boss": true, - "curly": true, - "eqeqeq": true, - "eqnull": true, - "expr": true, - "immed": true, - "noarg": true, - "quotmark": "double", - "smarttabs": true, - "trailing": true, - "undef": true, - "unused": true, - - "node": true -} diff --git a/Gruntfile.js b/Gruntfile.js index 9a64cefbe3f..d1bb2bd2ec5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -176,25 +176,11 @@ grunt.initConfig( { } } }, - - jscs: { - ui: { - options: { - config: true - }, - files: { - src: [ "demos/**/*.js", "build/**/*.js", "ui/**/*.js" ] - } + eslint:{ + options: { + configFile: "eslint.json" }, - tests: { - options: { - config: true, - maximumLineLength: null - }, - files: { - src: [ "tests/**/*.js" ] - } - } + target:["demos/**/*.js", "build/**/*.js", "ui/**/*.js"] }, uglify: minify, htmllint: { @@ -241,19 +227,6 @@ grunt.initConfig( { } } }, - jshint: { - options: { - jshintrc: true - }, - all: [ - "ui/*.js", - "Gruntfile.js", - "build/**/*.js", - "tests/unit/**/*.js", - "tests/lib/**/*.js", - "demos/**/*.js" - ] - }, csslint: { base_theme: { src: "themes/base/*.css", @@ -304,9 +277,6 @@ grunt.initConfig( { "jquery-simulate/jquery.simulate.js": "jquery-simulate/jquery.simulate.js", "jquery-simulate/LICENSE.txt": "jquery-simulate/LICENSE.txt", - "jshint/jshint.js": "jshint/dist/jshint.js", - "jshint/LICENSE": "jshint/LICENSE", - "jquery/jquery.js": "jquery-1.x/dist/jquery.js", "jquery/LICENSE.txt": "jquery-1.x/LICENSE.txt", @@ -508,7 +478,7 @@ grunt.registerTask( "update-authors", function() { grunt.registerTask( "default", [ "lint", "requirejs", "test" ] ); grunt.registerTask( "jenkins", [ "default", "concat" ] ); -grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ] ); +grunt.registerTask( "lint", [ "asciilint", "eslint", "csslint", "htmllint" ] ); grunt.registerTask( "test", [ "qunit" ] ); grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] ); grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] ); diff --git a/eslint.json b/eslint.json new file mode 100644 index 00000000000..956c72a3afd --- /dev/null +++ b/eslint.json @@ -0,0 +1,24 @@ +{ + "extends": "eslint:recommended", + "env": { + "amd": true, + "browser": true + }, + "globals": { + "jQuery": true, + "process": true, + "module": true, + "Buffer": true, + "Globalize": true + }, + "rules": { + "no-constant-condition": 1, + "no-control-regex": 0, + "no-empty": 1, + "no-mixed-spaces-and-tabs": 1, + "no-redeclare": 0, + "no-shadow-restricted-names": 1, + "no-unexpected-multiline": 1, + "no-useless-escape": 1 + } +} diff --git a/package.json b/package.json index a5a992de4c2..f20a21729ef 100644 --- a/package.json +++ b/package.json @@ -49,24 +49,26 @@ "jquery": ">=1.8.0 <4.0.0" }, "devDependencies": { + "bufferutil": "^4.0.2", "commitplease": "3.2.0", + "core-js": "^3.8.1", "glob": "7.1.6", "grunt": "1.3.0", - "grunt-bowercopy": "1.2.5", "grunt-cli": "1.3.2", "grunt-compare-size": "0.4.2", "grunt-contrib-concat": "1.0.1", "grunt-contrib-csslint": "2.0.0", - "grunt-contrib-jshint": "0.12.0", "grunt-contrib-qunit": "4.0.0", "grunt-contrib-requirejs": "1.0.0", "grunt-contrib-uglify": "5.0.0", + "grunt-eslint": "^23.0.0", "grunt-git-authors": "3.2.0", "grunt-html": "14.2.0", - "grunt-jscs": "2.1.0", "load-grunt-tasks": "5.1.0", + "minimatch": "^3.0.2", "rimraf": "3.0.2", - "testswarm": "1.1.2" + "testswarm": "1.1.2", + "utf-8-validate": "^5.0.3" }, "keywords": [] }