ionic-team / ionic-team/eslint-config

Plugin is not found when using husky/eslint

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13
Forks
9
Avg merge
12d 22h
Merged PRs (30d)
1

Description

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

```husky > pre-commit (node v18.19.1)
✔ 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.