[gjs/ewlsh/fix-eslint: 33/33] Add script for running eslint




commit ecdfcbf17c531797b0a322374402f5a0631f2b4f
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Nov 20 14:41:31 2020 -0800

    Add script for running eslint
    
    This is suitable for using either in CI or at the command line.

 .gitlab-ci.yml      | 3 +--
 tools/run_eslint.sh | 7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 43e3e6a3..df6c66d0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -174,8 +174,7 @@ eslint:
   image: node:12
   stage: source_check
   script:
-    - yarn install --frozen-lockfile
-    - yarn lint
+    - ./tools/run_eslint.sh
   except:
     refs:
       - schedules
diff --git a/tools/run_eslint.sh b/tools/run_eslint.sh
new file mode 100755
index 00000000..d5f2ea70
--- /dev/null
+++ b/tools/run_eslint.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
+# SPDX-FileCopyrightText: 2020 Philip Chimento <philip chimento gmail com>
+
+cd $(dirname -- "$0")
+yarn install --frozen-lockfile
+yarn lint "$@"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]