Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Server-generated routes in index.html: how do I keep the linter happy? #2593

Open mercmobily opened 6 years ago

mercmobily commented 6 years ago

I have this in my index.html:

<script src="/socket.io/socket.io.js"></script>
<script>
  window.socket = io() //eslint-disable-line
</script>

Note that /socket.io/socket.io.js is generated by the server thanks to the socket library. When I lint, I get:

    <script src="/socket.io/socket.io.js"></script>
                ~~~~~~~~~~~~~~~~~~~~~~~~~

index.html(61,16) error [could-not-load] - Unable to load import: ENOENT: no such file or directory, open '/home/merc/Development/node/sasit/public/socket.io/socket.io.js'

Since the file wasn't found. I need to keep it as it is... but at hte same time I would like the linter to pass. Is this use-case handled?

motss commented 6 years ago

I just load the script directly from CDN at top-level document.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.