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

feat: ✨ add pre-commit hook support #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nickbroon
Copy link

See: https://pre-commit.com/#creating-new-hooks for details

Can then be used with a .pre-commit-config.yaml containing:

repos:
  - repo: https://github.com/folke/devmoji
    # rev: pre-commit-hooks
    hooks:
    - id: devmoji

However it's failing at the moment due to:

An unexpected error has occurred: CalledProcessError: command: ('/home/nick/.cache/pre-commit/repo_ii3cm8v/node_env-default/bin/node', '/home/nick/.cache/pre-commit/repo_ii3cm8v/node_env-default/bin/npm', 'install', '--dev', '--prod', '--ignore-prepublish', '--no-progress', '--no-save')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    npm WARN install Usage of the `--dev` option is deprecated. Use `--include=dev` instead.
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE could not resolve
    npm ERR!
    npm ERR! While resolving: ts-jest@27.0.7
    npm ERR! Found: @types/jest@26.0.24
    npm ERR! node_modules/@types/jest
    npm ERR!   dev @types/jest@"26.0.24" from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peerOptional @types/jest@"^27.0.0" from ts-jest@27.0.7
    npm ERR! node_modules/ts-jest
    npm ERR!   dev ts-jest@"27.0.7" from the root project
    npm ERR!
    npm ERR! Conflicting peer dependency: @types/jest@27.4.1
    npm ERR! node_modules/@types/jest
    npm ERR!   peerOptional @types/jest@"^27.0.0" from ts-jest@27.0.7
    npm ERR!   node_modules/ts-jest
    npm ERR!     dev ts-jest@"27.0.7" from the root project
    npm ERR!
    npm ERR! Fix the upstream dependency conflict, or retry
    npm ERR! this command with --force, or --legacy-peer-deps
    npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
    npm ERR!
    npm ERR! See /home/nick/.npm/eresolve-report.txt for a full report.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/nick/.npm/_logs/2022-04-19T18_04_29_128Z-debug-0.log

Check the log at /home/nick/.cache/pre-commit/pre-commit.log

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

Successfully merging this pull request may close these issues.

1 participant