FortAwesome / vue-fontawesome

Font Awesome Vue component
https://fontawesome.com
MIT License
2.38k stars 132 forks source link

ESLint cannot recognize FontAwesomeIcon import #448

Closed AloisSeckar closed 2 months ago

AloisSeckar commented 1 year ago

Describe the bug Using ESLint with Nuxt config in Nuxt 3 project I am getting violation of import/named rule from import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

I am using the latest @fortawesome/vue-fontawesome. The import I copied from the docs and also it works correctly when applied. But the linting error is tedious.

Reproducible test case GitHub repo where I encountered it. It is part of a larger project, but with separate package.json

At the moment, I covered the issue up by a setting inside .eslintrc.json

"settings": {
  "import/ignore": [
    "*vue-fontawesome*"
  ]
}

So the import is not checked and the error is not raising.

Expected behavior Since the import is technically valid, there shouldn't be a clash with ESLint rules.

Desktop (please complete the following information):

Additional context Opened on request.

smujaddid commented 1 year ago

Any follow up on this issue? It is weird bug

wagslane commented 11 months ago

I'm getting the same bug

AloisSeckar commented 4 months ago

It looks like it got solved over the time. Eslint is now happy with it as it is.

My current dependencies:

"devDependencies": {
    "@fortawesome/fontawesome-svg-core": "6.5.1",
    "@fortawesome/free-solid-svg-icons": "6.5.1",
    "@fortawesome/vue-fontawesome": "3.0.6",
    "@nuxtjs/eslint-config-typescript": "12.1.0",
    "eslint": "8.57.0",
    "nuxt": "3.10.3"
}
jasonlundien commented 2 months ago

Ok cool, whew ;) .... closing for now!

If this pops up again just let us know !!!

Thank you, -jason