Skip to content

Configure eslint to ignore CDN imports in demo files#2

Merged
aarongustafson merged 3 commits into
mainfrom
copilot/fix-linter-issue
Dec 7, 2025
Merged

Configure eslint to ignore CDN imports in demo files#2
aarongustafson merged 3 commits into
mainfrom
copilot/fix-linter-issue

Conversation

Copilot AI commented Dec 7, 2025

Copy link
Copy Markdown
Contributor

The import-x/no-unresolved rule was failing on demo files that import from CDN URLs (esm.sh, unpkg.com), which cannot be resolved by the linter's module resolution.

Changes

  • Add eslint config override for demo/**/*.html files to ignore HTTPS URLs in the import-x/no-unresolved rule
  • Maintains strict import checking for source code while allowing external CDN references in demos
{
  files: ['demo/**/*.html'],
  rules: {
    'import-x/no-unresolved': [
      'error',
      {
        ignore: ['^https://'],
      },
    ],
  },
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/fullscreen-control/fullscreen-control/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/fullscreen-control/fullscreen-control/node_modules/vitest/dist/workers/forks.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] linter issue</issue_title>
<issue_description>## Description

/home/runner/work/fullscreen-control/fullscreen-control/demo/esm.html
Error:   40:45  error  Unable to resolve path to module 'https://esm.sh/@aarongustafson/fullscreen-control@2.0.0/fullscreen-control.js?bundle&target=es2022'  import-x/no-unresolved

/home/runner/work/fullscreen-control/fullscreen-control/demo/unpkg.html
Error:   52:44  error  Unable to resolve path to module 'https://unpkg.com/@aarongustafson/fullscreen-control@latest/define.js?module'  import-x/no-unresolved

✖ 2 problems (2 errors, 0 warnings)
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 7, 2025 18:33
Co-authored-by: aarongustafson <75736+aarongustafson@users.noreply.github.com>
Co-authored-by: aarongustafson <75736+aarongustafson@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix linter issue for module resolution Configure eslint to ignore CDN imports in demo files Dec 7, 2025
Copilot AI requested a review from aarongustafson December 7, 2025 18:38
@aarongustafson aarongustafson marked this pull request as ready for review December 7, 2025 19:04
@aarongustafson aarongustafson merged commit 7895b93 into main Dec 7, 2025
6 checks passed
@aarongustafson aarongustafson deleted the copilot/fix-linter-issue branch December 7, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] linter issue

2 participants