missing file extension error
See original GitHub issueLove the package! I believe this isn’t addressed by any of the other issues, although I only did a quick search for query.
When I import import maskIcon from 'src/components/Root/favicons/safari-pinned-tab.svg?external';
(I’m using a resource query because most svg’s go through react-svg-loader, but this one goes through file-loader), I get the following lint error:
19:22 error Missing file extension "svg" for "src/components/Root/favicons/safari-pinned-tab.svg?external" import/extensions
Thank you! And happy new year 🎉
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:6 (3 by maintainers)
Top Results From Across the Web
The Three Easiest Ways to Fix the "Missing File Extension 'tsx ...
The Three Easiest Ways to Fix the “Missing File Extension 'tsx'” Error · Add resolve.extensions: [". · Create React App Configuration Override ( ......
Read more >Typescript eslint - Missing file extension "ts" import/extensions
I have a simple Node/Express app made with Typescript. And eslint give me the error. Missing ...
Read more >[import/extensions] Missing file extension after upgrade to v2 ...
All import syntax (for ts and tsx files) got this kind of error. error Missing file extension for "./Query" import/extensions.
Read more >Error Missing file extension ts for lib env import extensions
I have installed eslint-plugin-impor & eslint-import-resolver-typescript. And I cannot figure out why, I got that error.
Read more >The case of the missing file extension - Office Watch
Fixing a bad or missing extension is soooo simple. The 'one off' fix is using the 'How do you want to open the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has since been fixed; in v2.20.0. Happy to reopen if not.
I took some time to review this issue and from what i can tell
eslint-plugin-import
is handling query strings correctly and I can’t recreate the issue in the unit tests (albeit it’s a contrived scenario). My theory is that something is processing the node and stripping the extension/querystring before it reacheseslint-plugin-import
. Will keep investigating.