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

ESLint cannot recognize FontAwesomeIcon import #448

Open
AloisSeckar opened this issue Feb 11, 2023 · 3 comments
Open

ESLint cannot recognize FontAwesomeIcon import #448

AloisSeckar opened this issue Feb 11, 2023 · 3 comments

Comments

@AloisSeckar
Copy link

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.

@smujaddid
Copy link

Any follow up on this issue? It is weird bug

@wagslane
Copy link

I'm getting the same bug

@AloisSeckar
Copy link
Author

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

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

No branches or pull requests

3 participants