From afca1ddf286e0a1b2f9660117d373000933bc18a Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra Date: Sun, 27 Aug 2023 19:55:01 -0400 Subject: [PATCH] ci: check for format and lint errors --- .github/workflows/ci.yml | 6 ++++++ package.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40e37d395..f12217821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,12 @@ jobs: run: corepack enable - name: Install dependencies run: npm ci + - name: Check for formatting errors + run: npm run ci:fmt + - name: Check for linting errors + run: npm run ci:lnt + - name: Link module + run: npm link nw-builder - name: Prepare test environment run: npm run test:prep - name: Run unit tests diff --git a/package.json b/package.json index 2bc30bafa..ae5c1c71c 100644 --- a/package.json +++ b/package.json @@ -43,9 +43,9 @@ "scripts": { "postinstall": "npm run test:prep", "ci:fmt": "prettier --check \"./**/*.{css,html,js,json,md,yml}\"", - "ci:lnt": "eslint --config=cfg/eslint.config.cjs cfg src test", + "ci:lnt": "eslint --config=cfg/eslint.config.cjs src test", "fmt": "prettier --write \"./**/*.{css,html,js,json,md,yml}\"", - "lnt": "eslint --config=cfg/eslint.config.cjs --fix cfg src test", + "lnt": "eslint --config=cfg/eslint.config.cjs --fix src test", "test:prep": "esbuild src/index.js --bundle --platform=node --outfile=./dist/index.cjs", "test:unit": "node --test test/unit/detectCurrentPlatform.js ", "test:tape": "tape './test/*.cjs'",