aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-06-02 13:45:08 +0200
committerGitHub <noreply@github.com>2020-06-02 13:45:08 +0200
commit40c3abd0ab049449acab5f2e12c34b9cc3199482 (patch)
treec070e335cf3fb7145bf9c2940acd693849541487
parent0b676ae12d20721e2df6f6f32f37f7302f8805bf (diff)
downloadjquery-40c3abd0ab049449acab5f2e12c34b9cc3199482.tar.gz
jquery-40c3abd0ab049449acab5f2e12c34b9cc3199482.zip
Build:Event: Make sure all source modules' exports are used (#4648)
To achieve that, use `eslint-plugin-import`'s `no-unused-modules` rule. Also, explicitly import `event/trigger.js` from `jquery.js`; so far it was only imported from ajax.js, making it mistakenly skipped in the `custom:slim,-deprecated` build.
-rw-r--r--src/.eslintrc.json4
-rw-r--r--src/core/init.js2
-rw-r--r--src/core/parseXML.js2
-rw-r--r--src/core/var/rhtml.js1
-rw-r--r--src/event/trigger.js2
-rw-r--r--src/jquery.js1
-rw-r--r--src/manipulation/_evalUrl.js2
7 files changed, 5 insertions, 9 deletions
diff --git a/src/.eslintrc.json b/src/.eslintrc.json
index 8b0b90f16..96b83ff10 100644
--- a/src/.eslintrc.json
+++ b/src/.eslintrc.json
@@ -13,6 +13,10 @@
"rules": {
"import/extensions": [ "error", "always" ],
"import/no-cycle": "error",
+ "import/no-unused-modules": [ "error", {
+ "unusedExports": true,
+ "ignoreExports": [ "src/*.js" ]
+ } ],
"indent": [ "error", "tab", {
"outerIIFEBody": 0
} ]
diff --git a/src/core/init.js b/src/core/init.js
index c2f35e1f4..a97fc1060 100644
--- a/src/core/init.js
+++ b/src/core/init.js
@@ -118,5 +118,3 @@ init.prototype = jQuery.fn;
// Initialize central reference
rootjQuery = jQuery( document );
-
-export default init;
diff --git a/src/core/parseXML.js b/src/core/parseXML.js
index d547eab53..715f59f1f 100644
--- a/src/core/parseXML.js
+++ b/src/core/parseXML.js
@@ -20,5 +20,3 @@ jQuery.parseXML = function( data ) {
}
return xml;
};
-
-export default jQuery.parseXML;
diff --git a/src/core/var/rhtml.js b/src/core/var/rhtml.js
deleted file mode 100644
index 3dace14c5..000000000
--- a/src/core/var/rhtml.js
+++ /dev/null
@@ -1 +0,0 @@
-export default ( /HTML$/i );
diff --git a/src/event/trigger.js b/src/event/trigger.js
index f36000af7..7919a5013 100644
--- a/src/event/trigger.js
+++ b/src/event/trigger.js
@@ -190,5 +190,3 @@ jQuery.fn.extend( {
}
}
} );
-
-export default jQuery;
diff --git a/src/jquery.js b/src/jquery.js
index d9fd61afa..a0d5d3647 100644
--- a/src/jquery.js
+++ b/src/jquery.js
@@ -11,6 +11,7 @@ import "./queue.js";
import "./queue/delay.js";
import "./attributes.js";
import "./event.js";
+import "./event/trigger.js";
import "./manipulation.js";
import "./manipulation/_evalUrl.js";
import "./wrap.js";
diff --git a/src/manipulation/_evalUrl.js b/src/manipulation/_evalUrl.js
index f88b747cc..0f7559ff0 100644
--- a/src/manipulation/_evalUrl.js
+++ b/src/manipulation/_evalUrl.js
@@ -22,5 +22,3 @@ jQuery._evalUrl = function( url, options, doc ) {
}
} );
};
-
-export default jQuery._evalUrl;