Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unused imports in icon-types.ts in kit (urgent/critical) #557

Closed
niborium opened this issue Feb 29, 2024 · 8 comments
Closed

unused imports in icon-types.ts in kit (urgent/critical) #557

niborium opened this issue Feb 29, 2024 · 8 comments

Comments

@niborium
Copy link

niborium commented Feb 29, 2024

Describe the bug
Hello,
We use fontawesome kit according to docs https://fontawesome.com/docs/web/use-with/react/.
When we try to build with vite & tcs we get following error.
tsc error

All imports in import declaration is unused.

node_modules/@awesome.me/kit_example/icons/modules/icon-types.ts

Line 2 is unused imports Icon & IconParams are not used..

Can you please remove you unused imports from icon-types.ts and release a fix for this?

Reproducible test case
Not needed, you can try this yourself and run tsc with linting rules and you will see you get this error.
If you are not using imports (unused) please remove them. If companies not have proper linting/tsc setup maybe precommit linting or proper config setup it make break build scripts etc.

Expected behavior
We should be able to run tsc without haven broken/unused imports in your library.

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version

Additional context
Add any other context about the problem here.

@rivaridley
Copy link

rivaridley commented Mar 4, 2024

I am also running into this issue using a font awesome kit in a react project with Vite:

image

This is blocking us from switching over to using FA Kits. +1 to removing this unused import on line 2 of icon-types.ts.

@justinvforvendetta
Copy link

seems this repo isnt active anymore, am i wrong? was looking for the bluesky logo, but i see no ones done anything here for a few years, npm says 2 years since a release

@robmadole
Copy link
Member

We'll try and get this fixed up in the next release. It takes a full release of Font Awesome for these and those take a little bit of planning.

Thanks for reporting it.

@rivaridley
Copy link

Thanks @robmadole for your response and prioritizing a fix for this in the next release.

Can you share an idea of when the next release will happen? My team will be waiting for this to upgrade to kits, as workarounds to ignore the error have been unsuccessful. We don't want to remove type check, and can't successfully ignore this file since its being referenced in our project. If you have any suggestions to unblock in the meantime, they would be appreciated.

@rivaridley
Copy link

@robmadole I see there was a new release for font-awesome a couple days ago, but a fix for this doesnt seem to be included(?) Is there still plans to fix this issue? Or any suggestions you have for a workaround are appreciated. Thank you

@sthota-fms
Copy link

@robmadole +1, having the same issue. Please provide a workaround.

@niborium
Copy link
Author

niborium commented Apr 8, 2024

@robmadole i mean it's just remove 1 line of code. Estimated time for a developer: 5 seconds. It's no rocket science.

@robmadole
Copy link
Member

@rivaridley we didn't have a chance to get this included in the 6.5.2 release so we'll work on this for the next one.

@sthota-fms we haven't identified a workaround at this time.

@niborium the fix is 2 lines but testing takes time. Since Font Awesome is a mature and widely used product we don't skip this important step.

I'm closing this issue as @rivaridley opened another one in the main Font-Awesome repo so we'll work on it there. This fix is not specific to react-fontawesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants