Reputation: 1865
I was trying to commit the changes to my dev branch in Gitlab, but whenever i try to commit changes it shows the errors of ESLint and the commit gets aborted.
I tried cloning the repository from dev branch and made changes and installed dependencies using 'npm install' and the errors seems to appear only when dependencies are installed.
Tested without installing npm dependencies, made changes to the code and tried to commit , and Voila! it worked, and changes pushed to the dev branch.
Help me to avoid these errors appearing at the time of pushing the changes.
(Please check the image below to view the errors displayed)
Upvotes: 0
Views: 5629
Reputation: 3223
Put --no-verify
before -m
(message):
git commit --no-verify -m 'commit message'
Upvotes: 0
Reputation: 1865
It worked when i used
git commit -m "Commit Message" --no-verify
and this is what i was looking for. I was looking to bypass without fixing those ESLint errors!
Upvotes: 4
Reputation: 10224
Fix lint errors before pushing. If you don't understand a rule, search it on eslint doc.
Upvotes: 0