unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
3.66k stars 131 forks source link

Icon* is not defined. eslint react/jsx-no-undef #271

Closed adamboof closed 1 year ago

adamboof commented 1 year ago

Describe the bug

When use the auto import module for webpack and React, I can get the icons to load fine but I am left with an eslint error for react/jsx-no-undef.

I don't particularly want to disable this rule but I can't find any other workaround.

Any help?

Reproduction

Use the auto-import module with webpack, eslint, React and Typescript

System Info

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 89.30 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.1.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Firefox: 108.0.2
    Safari: 16.2

Used Package Manager

yarn

Validations

antfu commented 1 year ago

https://github.com/antfu/unplugin-auto-import#eslint