diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-02-15 12:15:56 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-02-17 07:18:34 +0000 |
commit | e5451bdc1d5dae34c964864c76ba995584c5daaf (patch) | |
tree | 4d5ba92043b9a08d4f4e2a9584f6a68bfec6b5db | |
parent | f4d42825c81b3275cdb0135767f0ff504b7d6dad (diff) |
Setup JavaScript linter
Change-Id: Ife25ded53fa82550b86a2adbbb8f8d453c436800
Issue-ID: CIMAN-33
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rw-r--r-- | .coafile | 5 | ||||
-rw-r--r-- | tox.ini | 12 |
2 files changed, 15 insertions, 2 deletions
@@ -27,3 +27,8 @@ ignore = bears = MarkdownBear ignore = .tox/** + +[js] +bears = JSHintBear +ignore = + .tox/** @@ -1,8 +1,8 @@ [tox] minversion = 3.2.0 -envlist = json,yaml,py,md +envlist = json,yaml,py,md,js skipsdist = true -requires = pip >= 8 +requires = pip >= 20 [testenv] basepython = python3 @@ -42,3 +42,11 @@ commands_pre = /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md" commands = /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ " + +[testenv:js] +commands_pre = + nodeenv -p --verbose + npm install --global jshint + /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.js' > /tmp/.coalist_js" +commands = + /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn -m MAJOR js --files $(</tmp/.coalist_js) \ " |