chore: resolve errors encountered when running Lefthook #140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
To resolve errors occurring when running Lefthook, I will modify the settings for ESLint and Prettier.
Changes
Modify ESLint settings
Since Jest will not be used for a while, I uninstalled
eslint-plugin-jest
and removed references toeslint-plugin-jest
from.eslintrc.js
.This change resolves ESLint errors when running Lefthook.
Modify Prettier settings
To resolve errors when running Prettier, I modified the
plugins
section in.prettierrc.js
.This change resolves Prettier errors when running Lefthook.
Testing
I confirmed that Lefthook's
pre-commit
works correctly with the following steps:yarn lefthook run pre-commit
in the terminal.I confirmed that Lefthook's
pre-push
works correctly with the following steps:yarn lefthook run pre-push
in the terminal.Related Issues (Optional)
None
Notes (Optional)
I referred to the following page for the Prettier settings modification:
Cannot use any prettier plugins with yarn 4 + PnP