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

fix: add missing dep for eslint-plugin-react-hooks #465

Merged
merged 1 commit into from
May 6, 2024

Conversation

KaiVandivier
Copy link
Contributor

Noticed that this was missing a dependency eslint-plugin-react-hooks, but it was hidden since it was piggy-backing on the dependency from react-scripts. In the platform, after removing react-scripts, this failed to run (see git logs below).

Adding the plugin as a dev dependency in the platform repo fixed it, so I'm confident adding the dep in here will fix it for consumers 👍

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
yarn run v1.22.19
$ /Users/kai/dev/dhis2/app-platform/node_modules/.bin/d2-style check --staged
javascript > eslint 

Oops! Something went wrong! :(

ESLint: 7.32.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "/Users/kai/dev/dhis2/app-platform/node_modules/@dhis2/cli-style".)

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

    npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in ".eslintrc.js » /Users/kai/dev/dhis2/app-platform/node_modules/@dhis2/cli-style/config/eslint-react.config.js".

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

javascript > prettier 
Checking formatting...
All matched files use Prettier code style!
 
structured-text > prettier 
Checking formatting...
All matched files use Prettier code style!
 
 
[ERROR] Failed to verify code style, see above output for details. 
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 2 (error)

@KaiVandivier KaiVandivier requested a review from a team May 6, 2024 17:08
@KaiVandivier KaiVandivier merged commit 8eb105e into master May 6, 2024
7 checks passed
@KaiVandivier KaiVandivier deleted the fix-eslint-plugin-react-hooks-dep branch May 6, 2024 17:17
dhis2-bot added a commit that referenced this pull request May 6, 2024
## [10.5.2](v10.5.1...v10.5.2) (2024-05-06)

### Bug Fixes

* add missing dep for eslint-plugin-react-hooks ([#465](#465)) ([8eb105e](8eb105e))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants