Prevent developers from promoting code with pile errors

What is the best method to allow other users to push lint error code in the project environment using git / nodejs / webpack / VS Code

+3


source to share


1 answer


If you can, set up a server side pre-receive hook that linter will execute (like this one )

That is: add the executable myrepo.git / hooks / pre-receive which will execute linter and if an error is found it will return "1" (no-0 status will not be pressed)



If you cannot add a server side hook (GitHub, BitBucket, GitLab, ...) then declare web hockey and set a listener as described in markstory/lint-review

(this may not be nodejs linter, but reveals the idea of ​​how to install web -host / listener)

The idea remains: it is better to apply it at the server level than at the developer level (where they can skip this test anyway)

+1


source







All Articles