fix: Add eslint disable to the bundled import script file - #91
Merged
Conversation
arumsey
approved these changes
Apr 23, 2026
arumsey
left a comment
Contributor
There was a problem hiding this comment.
LGTM! I think it is fine to add this to every bundle request. Even those outside of ExMod.
|
🎉 This PR is included in version 1.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added banner: { js: '/* eslint-disable */' } to the esbuild config in aem-import-helper's src/import/bundler.js (and updated test/import/bundler.test.js) so
generated .bundle.js files don't trigger lint errors in downstream EDS projects.
Related Issue
https://github.com/Adobe-AEM-Foundation/aem-experience-catalyst/issues/845
Motivation and Context
Bundles generated by
aem-import-helper bundleare written totools/importer/<name>.bundle.jsin consuming EDS projects, where they get picked up by the project'sESLint config and produce hundreds of lint errors during the build (unused vars, non-standard formatting from the minified IIFE, etc.).
Downstream consumers currently work around this by either adding
tools/importer/**/*.bundle.jsto.eslintignoreor post-processing the file to prepend a disablebanner. Both approaches require every consumer to know about the issue and apply the fix themselves.
Since the bundler is the single source of these files and esbuild already supports a
banneroption, emitting/* eslint-disable */as the first line at generationtime is the cleanest fix — it makes the artifact safe by default for every consumer with no additional config.
How Has This Been Tested?
Minimal valid import script
Point npx at your local checkout so it uses your edits
Types of changes
Checklist: