Skip to content

Plugin is not found when using husky/eslint #18

Description

@scarela

I've a Husky pre-commit command to lint the code of an application but this is now failing because it never finds the plugin:

CLI ouput

✔ Preparing...
⚠ Running tasks...
  ❯ Running tasks for *.ts
    ✖ eslint --fix [FAILED]
  ✔ Running tasks for *.{ts,css,scss,html}
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up...

✖ eslint --fix:

Oops! Something went wrong! :(

ESLint: 8.45.0

ESLint couldn't find the plugin "@ionic/eslint-plugin-eslint-config".

(The package "@ionic/eslint-plugin-eslint-config" was not found when loaded as a Node module from the directory "[___]".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install @ionic/eslint-plugin-eslint-config@latest --save-dev

The plugin "@ionic/eslint-plugin-eslint-config" was referenced from the config file in ".eslintrc.json#overrides[0]".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

husky > pre-commit hook failed (add --no-verify to bypass)

And this is what I have in my configuration file:
Image

The dependency is correctly installed as a dev dependency in the project:
Image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions