mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Require extensions for ES6 imports, prevent import cycles
jQuery source is now authored in ECMAScript modules. Native browser support
for them requires full file names including extensions. Rollup works even
if import paths don't specify extensions, though, so one import slipped
through without such an extension, breaking native browser import of
src/jquery.js.
A new ESLint rule using eslint-plugin-import prevents us from regressing
on that front.
Also, eslint-plugin-import's no-cycle rule is used to avoid import cycles.
Closes gh-4544
Ref gh-4541
Ref 075320149a
This commit is contained in:
parent
075320149a
commit
44ac8c8529
@ -30,6 +30,7 @@
|
|||||||
"commitplease": "3.2.0",
|
"commitplease": "3.2.0",
|
||||||
"core-js-bundle": "3.0.0",
|
"core-js-bundle": "3.0.0",
|
||||||
"eslint-config-jquery": "2.0.0",
|
"eslint-config-jquery": "2.0.0",
|
||||||
|
"eslint-plugin-import": "2.18.2",
|
||||||
"grunt": "1.0.4",
|
"grunt": "1.0.4",
|
||||||
"grunt-babel": "8.0.0",
|
"grunt-babel": "8.0.0",
|
||||||
"grunt-cli": "1.3.2",
|
"grunt-cli": "1.3.2",
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"plugins": [ "import" ],
|
||||||
|
|
||||||
|
"rules": {
|
||||||
|
"import/extensions": [ "error", "always" ],
|
||||||
|
"import/no-cycle": "error"
|
||||||
|
},
|
||||||
|
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": "wrapper.js",
|
"files": "wrapper.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user