mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
added node hooks setup and jshint
This commit is contained in:
parent
356e4ba13b
commit
7fbc935d1c
4 changed files with 51 additions and 6 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import contextlib
|
||||
from plumbum import local
|
||||
from plumbum.machines.session import ShellSession
|
||||
from pre_commit.languages import helpers
|
||||
|
||||
PY_ENV = 'py_env'
|
||||
|
||||
|
|
@ -30,7 +31,4 @@ def install_environment():
|
|||
def run_hook(hook, file_args):
|
||||
with in_env() as env:
|
||||
# TODO: batch filenames
|
||||
return env.run(
|
||||
' '.join([hook['entry']] + hook.get('args', []) + list(file_args)),
|
||||
retcode=None,
|
||||
)
|
||||
return helpers.run_hook(env, hook, file_args)
|
||||
Loading…
Add table
Add a link
Reference in a new issue