diff --git a/.editorconfig b/.editorconfig
index b5bd7f60ec..0fe2cbbba5 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -10,7 +10,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-[package.json]
+[*.{json,yml}]
indent_style = space
indent_size = 2
-
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index e1d456ddfd..0000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,16 +0,0 @@
-amd
-external
-node_modules
-*.min.js
-dist/**
-!dist/jquery.js
-!dist/jquery.min.js
-test/data/jquery-1.9.1.js
-test/data/badcall.js
-test/data/badjson.js
-test/data/json_obj.js
-test/data/readywaitasset.js
-test/data/readywaitloader.js
-test/data/support/csp.js
-test/data/support/getComputedSupport.js
-test/data/core/jquery-iterability-transpiled.js
diff --git a/.eslintrc-browser.json b/.eslintrc-browser.json
deleted file mode 100644
index 97b5abe852..0000000000
--- a/.eslintrc-browser.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "root": true,
-
- "extends": "jquery",
-
- "reportUnusedDisableDirectives": true,
-
- "parserOptions": {
- "ecmaVersion": 5
- },
-
- // The browser env is not enabled on purpose so that code takes
- // all browser-only globals from window instead of assuming
- // they're available as globals. This makes it possible to use
- // jQuery with tools like jsdom which provide a custom window
- // implementation.
- "env": {},
-
- "globals": {
- "window": true
- },
-
- "rules": {
- "one-var": ["error", {"var": "always"}],
- "strict": ["error", "function"]
- }
-}
diff --git a/.eslintrc-node.json b/.eslintrc-node.json
deleted file mode 100644
index 8cb69807b3..0000000000
--- a/.eslintrc-node.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "root": true,
-
- "extends": "jquery",
-
- "reportUnusedDisableDirectives": true,
-
- "parserOptions": {
- "ecmaVersion": 2018
- },
-
- "env": {
- "es6": true,
- "node": true
- },
-
- "rules": {
- "strict": ["error", "global"]
- }
-}
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index d2c977ca85..0000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "root": true,
-
- "extends": "./.eslintrc-node.json"
-}
diff --git a/.gitattributes b/.gitattributes
index b7ca95b5b7..5832a0194d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,4 +2,7 @@
* text=auto
# JS files must always use LF for tools to work
+# JS files may have mjs or cjs extensions now as well
*.js eol=lf
+*.cjs eol=lf
+*.mjs eol=lf
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 828672208e..ec0910b10e 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -11,7 +11,6 @@ Mark an `[x]` for completed items, if you're not sure leave them unchecked and w
-->
* [ ] New tests have been added to show the fix or feature works
-* [ ] Grunt build and unit tests pass locally with these changes
* [ ] If needed, a docs issue/PR was created at https://github.com/jquery/api.jquery.com
-
+
@@ -19,27 +19,28 @@
-
+
-
+
diff --git a/test/jquery.js b/test/jquery.js
index 3292852510..cd9c490b10 100644
--- a/test/jquery.js
+++ b/test/jquery.js
@@ -1,15 +1,8 @@
// Use the right jQuery source on the test page (and iframes)
( function() {
- /* global loadTests: false */
-
var dynamicImportSource, config, src,
- FILEPATH = "/test/jquery.js",
- activeScript = [].slice.call( document.getElementsByTagName( "script" ), -1 )[ 0 ],
- parentUrl = activeScript && activeScript.src ?
- activeScript.src.replace( /[?#].*/, "" ) + FILEPATH.replace( /[^/]+/g, ".." ) + "/" :
- "../",
- QUnit = window.QUnit,
- require = window.require;
+ parentUrl = window.location.protocol + "//" + window.location.host,
+ QUnit = window.QUnit;
function getQUnitConfig() {
var config = Object.create( null );
@@ -37,10 +30,6 @@
id: "esmodules",
label: "Load as modules",
tooltip: "Load the jQuery module file (and its dependencies)"
- }, {
- id: "amd",
- label: "Load with AMD",
- tooltip: "Load the AMD jQuery file (and its dependencies)"
}, {
id: "dev",
label: "Load unminified",
@@ -62,8 +51,8 @@
// IE doesn't support the dynamic import syntax so it would crash
// with a SyntaxError here.
dynamicImportSource = "" +
- "import( `${ parentUrl }src/jquery.js` )\n" +
- " .then( ( { default: jQuery } ) => {\n" +
+ "import( `${ parentUrl }/src/jquery.js` )\n" +
+ " .then( ( { jQuery } ) => {\n" +
" window.jQuery = jQuery;\n" +
" if ( typeof loadTests === \"function\" ) {\n" +
" // Include tests if specified\n" +
@@ -77,23 +66,9 @@
eval( dynamicImportSource );
- // Apply similar treatment for AMD modules
- } else if ( config.amd && QUnit ) {
- require.config( {
- baseUrl: parentUrl
- } );
- src = "amd/jquery";
-
- // Include tests if specified
- if ( typeof loadTests !== "undefined" ) {
- require( [ src ], loadTests );
- } else {
- require( [ src ] );
- }
-
// Otherwise, load synchronously
} else {
- document.write( "
-
- %SCRIPTS%
-
-
-
-
-