From 95dd39fc2b1dec4e3329fc434937c668ac07439a Mon Sep 17 00:00:00 2001 From: Kun Ren Date: Wed, 27 May 2020 11:28:15 +0800 Subject: [PATCH 1/2] Define lint in package.json and use it in GitHub Actions --- .github/workflows/main.yml | 3 +-- package.json | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59ebdd79b..b16a488f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,8 +38,7 @@ jobs: with: node-version: "13.x" - run: npm ci - - name: Run eslint - run: ./node_modules/.bin/eslint -c ./.eslintrc.js './src/**' + - run: npm run lint lintr: runs-on: ubuntu-latest container: diff --git a/package.json b/package.json index 23752fc2d..ef48d8309 100644 --- a/package.json +++ b/package.json @@ -500,7 +500,8 @@ "compile": "webpack --mode none", "watch": "webpack --mode none --watch", "pretest": "tsc -p ./", - "test": "node ./out/test/runTest.js" + "test": "node ./out/test/runTest.js", + "lint": "eslint src --ext ts" }, "devDependencies": { "@types/fs-extra": "^8.1.0", From fbc94cb2372f9fb3b3678ca7115f6b4ccc92af7b Mon Sep 17 00:00:00 2001 From: Kun Ren Date: Wed, 27 May 2020 11:37:41 +0800 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b16a488f5..7fda2d426 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: "13.x" - - run: npm ci + - run: npm install - run: npm run lint lintr: runs-on: ubuntu-latest