diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2021-06-07 00:58:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 00:58:12 +0200 |
commit | 70dae67b73dfea9126f126f516fe8286f1e73417 (patch) | |
tree | e61eafab41ee74330fecf1da2ce125050cfac49b /Gruntfile.js | |
parent | a12c98574d07f002fd59d166f9fc1fd391581b91 (diff) | |
download | jquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.tar.gz jquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.zip |
Build: Migrate from JSHint & JSCS to ESLint
Fixes #15393
Closes gh-1958
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index ad5ce1961..b18b74b11 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ -module.exports = function( grunt ) { - "use strict"; +module.exports = function( grunt ) { + var glob = require( "glob" ), @@ -177,25 +177,6 @@ grunt.initConfig( { } }, - jscs: { - ui: { - options: { - config: true - }, - files: { - src: [ "demos/**/*.js", "build/**/*.js", "ui/**/*.js" ] - } - }, - tests: { - options: { - config: true, - maximumLineLength: null - }, - files: { - src: [ "tests/**/*.js" ] - } - } - }, uglify: minify, htmllint: { good: { @@ -203,7 +184,7 @@ grunt.initConfig( { ignore: [ /The text content of element “script” was not in the required format: Expected space, tab, newline, or slash but found “.” instead/ ] }, - src: glob.sync("{demos,tests}/**/*.html", { + src: glob.sync( "{demos,tests}/**/*.html", { ignore: htmllintBad } ) }, @@ -242,12 +223,10 @@ grunt.initConfig( { } } }, - jshint: { - options: { - jshintrc: true - }, + eslint: { all: [ - "ui/*.js", + "ui/**/*.js", + "!ui/vendor/**/*.js", "Gruntfile.js", "build/**/*.js", "tests/unit/**/*.js", @@ -287,10 +266,12 @@ grunt.initConfig( { "qunit/qunit.css": "qunit/qunit/qunit.css", "qunit/LICENSE.txt": "qunit/LICENSE.txt", - "qunit-assert-classes/qunit-assert-classes.js": "qunit-assert-classes/qunit-assert-classes.js", + "qunit-assert-classes/qunit-assert-classes.js": + "qunit-assert-classes/qunit-assert-classes.js", "qunit-assert-classes/LICENSE.txt": "qunit-assert-classes/LICENSE", - "qunit-assert-close/qunit-assert-close.js": "qunit-assert-close/qunit-assert-close.js", + "qunit-assert-close/qunit-assert-close.js": + "qunit-assert-close/qunit-assert-close.js", "qunit-assert-close/MIT-LICENSE.txt": "qunit-assert-close/MIT-LICENSE.txt", "qunit-composite/qunit-composite.js": "qunit-composite/qunit-composite.js", @@ -305,9 +286,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", @@ -443,10 +421,12 @@ grunt.initConfig( { "jquery-3.6.0/jquery.js": "jquery-3.6.0/dist/jquery.js", "jquery-3.6.0/LICENSE.txt": "jquery-3.6.0/LICENSE.txt", - "jquery-migrate-1.4.1/jquery-migrate.js": "jquery-migrate-1.4.1/dist/jquery-migrate.js", + "jquery-migrate-1.4.1/jquery-migrate.js": + "jquery-migrate-1.4.1/dist/jquery-migrate.js", "jquery-migrate-1.4.1/LICENSE.txt": "jquery-migrate-1.4.1/LICENSE.txt", - "jquery-migrate-3.3.2/jquery-migrate.js": "jquery-migrate-3.3.2/dist/jquery-migrate.js", + "jquery-migrate-3.3.2/jquery-migrate.js": + "jquery-migrate-3.3.2/dist/jquery-migrate.js", "jquery-migrate-3.3.2/LICENSE.txt": "jquery-migrate-3.3.2/LICENSE.txt" } } @@ -512,7 +492,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" ] ); |