vue-fontawesome icon indicating copy to clipboard operation
vue-fontawesome copied to clipboard

ESLint cannot recognize FontAwesomeIcon import

Open AloisSeckar opened this issue 2 years ago • 2 comments

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):

  • Happening inside VS Code 1.75.1 with ESLint plugin 2.4.0
  • Node 18.14, Nuxt 3.2.0, vue-fontawesome 3.0.3

Additional context Opened on request.

AloisSeckar avatar Feb 11 '23 13:02 AloisSeckar

Any follow up on this issue? It is weird bug

smujaddid avatar Mar 08 '23 22:03 smujaddid

I'm getting the same bug

wagslane avatar Aug 21 '23 02:08 wagslane

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"
}

AloisSeckar avatar Mar 25 '24 18:03 AloisSeckar

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

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

Thank you, -jason

jasonlundien avatar May 21 '24 21:05 jasonlundien