From b9755b7ca752331ed7a3b19ffe063c21bacaa36f Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Fri, 18 Dec 2020 10:15:49 -0600 Subject: [PATCH 1/4] replaced jscs with eslint --- Gruntfile.js | 24 +++++------------------- eslint.json | 24 ++++++++++++++++++++++++ package.json | 9 ++++++--- 3 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 eslint.json diff --git a/Gruntfile.js b/Gruntfile.js index 9a64cefbe3f..87f30d7ca64 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: { @@ -508,7 +494,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", "jshint", "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..1aa0c6c9cf9 --- /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 + } +} \ No newline at end of file diff --git a/package.json b/package.json index a5a992de4c2..d1d3ae4b67e 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,11 @@ "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", @@ -61,12 +62,14 @@ "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": [] } From 27a13f702c9f838e45ae602d2f2b95de599577fa Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Tue, 23 Feb 2021 19:13:52 -0600 Subject: [PATCH 2/4] Added blank row to end of eslint.json --- eslint.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/eslint.json b/eslint.json index 1aa0c6c9cf9..956c72a3afd 100644 --- a/eslint.json +++ b/eslint.json @@ -1,24 +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 - } -} \ No newline at end of file + "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 + } +} From 22f9223ee7b0fad5ce286e4d08c580daea609d00 Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Tue, 23 Feb 2021 19:20:28 -0600 Subject: [PATCH 3/4] removed eshint from package --- Gruntfile.js | 18 +----------------- package.json | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 87f30d7ca64..d1bb2bd2ec5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -227,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", @@ -290,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", @@ -494,7 +478,7 @@ grunt.registerTask( "update-authors", function() { grunt.registerTask( "default", [ "lint", "requirejs", "test" ] ); grunt.registerTask( "jenkins", [ "default", "concat" ] ); -grunt.registerTask( "lint", [ "asciilint", "jshint", "eslint", "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/package.json b/package.json index d1d3ae4b67e..f20a21729ef 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "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", From d5dc6f631c829be709721c67bd9e7106bfeb6dd6 Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Tue, 23 Feb 2021 19:21:41 -0600 Subject: [PATCH 4/4] removed jshint supporting files --- .jshintignore | 3 --- .jshintrc | 16 ---------------- 2 files changed, 19 deletions(-) delete mode 100644 .jshintignore delete mode 100644 .jshintrc 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 -}