From bf5e9abaa644c9cf51c99bcdc4907eb901977073 Mon Sep 17 00:00:00 2001 From: Justin Santer Date: Fri, 18 Feb 2022 23:42:20 -0500 Subject: [PATCH] added step in pipeline that checks if code is valid via eslint Signed-off-by: Justin Santer --- .github/workflows/pipeline.yml | 6 +++--- package.json | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 96d51d6..71d3337 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -56,12 +56,12 @@ jobs: - name: '[Build] Node.js project build' run: npm run build - - name: '[Lint] Ensure consistent code styling' - run: npm run lint - - name: '[Test] Node.js project unit tests' run: npm test + - name: '[Lint] Check if code has any warnings/errors/non-standard styling' + run: npm run check-lint + deploy: runs-on: ubuntu-latest needs: [check-permission, build-test] diff --git a/package.json b/package.json index ef0d5a9..9f18d4b 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "description": "Top-level package for ZEBRA packages", "main": "index.js", "scripts": { - "prebuild": "npm install --include=dev && foreach -g \"./packages/*/package.json\" -x \"npm install --prefix #{dir} --include=dev\"", - "build": "foreach -g \"./packages/*/package.json\" -x \"npm run --prefix #{dir} build\"", - "test": "foreach -g \"./packages/*/package.json\" -x \"npm test --prefix #{dir}\"", + "prebuild": "npm install --include=dev && foreach -g \"./packages/*/package.json\" -x \"npm install --prefix #{dir} --include=dev\" --concurrent", + "build": "foreach -g \"./packages/*/package.json\" -x \"npm run --prefix #{dir} build\" --concurrent", + "test": "foreach -g \"./packages/*/package.json\" -x \"npm test --prefix #{dir}\" --concurrent", "prepare": "husky install", - "lint": "pretty-quick --staged && lint-staged" + "lint": "pretty-quick --staged && lint-staged", + "check-lint": "npx eslint packages --ext .ts" }, "repository": { "type": "git",