Git Product home page Git Product logo

husky-conflict-hook's Introduction

English | 简体中文

husky-conflict-hook used to check for git conflict by the keyword <<<<<<< HEAD


Using npm:

# Install dependency
$ npm i husky-conflict-hook -D

# It is based on husky and lint-staged. Usually, we have already install husky and lint-staged, so I didn't put them in the dependencies. So you can also install them individually. Due to different versions of husky, the configuration of husky may be slightly different. For details, it depends on the documents of different versions of husky

$ npm i husky lint-staged -D

# its option in package.json is
```json
{
    "lint-staged": {
        "*": "husky-conflict-hook"
    },
}
#  "*" means that every file in the git staged will be checked

Links

husky-conflict-hook's People

Contributors

ka-houl avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

husky-conflict-hook's Issues

env: node\r: No such file or directory

# git commit -m ''

husky > pre-commit (node v12.13.0)
✔ Preparing...
⚠ Running tasks...
  ❯ Running tasks for *
    ✖ husky-conflict-hook [FAILED]
  ↓ No staged files match *.{js,vue,ts} [SKIPPED]
  ↓ No staged files match *.{css,vue,scss} [SKIPPED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up...

✖ husky-conflict-hook:
env: node\r: No such file or directory
husky > pre-commit hook failed (add --no-verify to bypass)

There is no such /usr/bin/env in my local machine which throws above error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.