diff --git a/.eslintrc.json b/.eslintrc.json index 2fad01637..d2c977ca8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,14 +1,5 @@ { "root": true, - "extends": "./.eslintrc-node.json", - - "overrides": [ - { - "files": "rollup.config.js", - "parserOptions": { - "sourceType": "module" - } - } - ] + "extends": "./.eslintrc-node.json" } diff --git a/Gruntfile.js b/Gruntfile.js index 0d79e37c0..3b6cd5bba 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,7 +24,7 @@ module.exports = function( grunt ) { grunt.initConfig( { pkg: grunt.file.readJSON( "package.json" ), dst: readOptionalJSON( "dist/.destination.json" ), - "compare_size": { + compare_size: { files: [ "dist/jquery.js", "dist/jquery.min.js" ], options: { compress: { @@ -232,7 +232,7 @@ module.exports = function( grunt ) { "test/data/jquery-1.9.1.js", "test/data/testinit-jsdom.js", - // We don't support various loading methods like AMD, + // We don't support various loading methods like esmodules, // choosing a version etc. for jsdom. "dist/jquery.js", diff --git a/build/tasks/amd.js b/build/tasks/amd.js index 617773ff2..c4c9c8941 100644 --- a/build/tasks/amd.js +++ b/build/tasks/amd.js @@ -19,7 +19,8 @@ module.exports = function( grunt ) { const outputRollupOptions = { format: "amd", - dir: "amd" + dir: "amd", + indent: false }; grunt.registerTask( diff --git a/build/tasks/build.js b/build/tasks/build.js index 6f984b705..06a5f4048 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -54,7 +54,7 @@ module.exports = function( grunt ) { grunt.registerMultiTask( "build", - "Concatenate source, remove sub AMD definitions, " + + "Build jQuery ECMAScript modules, " + "(include/exclude modules with +/- flags), embed date/version", async function() { const done = this.async(); @@ -302,7 +302,7 @@ module.exports = function( grunt ) { ); grunt.file.write( name, compiledContents ); - grunt.log.ok( "File '" + name + "' created." ); + grunt.log.ok( `File '${ name }' created.` ); done(); } catch ( err ) { done( err ); diff --git a/src/.eslintrc.json b/src/.eslintrc.json index 0c1f3f8a7..8b0b90f16 100644 --- a/src/.eslintrc.json +++ b/src/.eslintrc.json @@ -34,7 +34,7 @@ // Code Style. This makes that indentation check is not // performed for 1 depth of outer FunctionExpressions "ignoredNodes": [ - "Program > ExpressionStatement > CallExpression > FunctionExpression > *" + "Program > ExpressionStatement > CallExpression > :last-child > *" ] } ] }, diff --git a/src/ajax.js b/src/ajax.js index 61079883e..a6dc4095a 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -576,7 +576,7 @@ jQuery.extend( { } // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + // Don't fire events if jQuery.event is undefined in an ESM-usage scenario (trac-15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests