diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..2fc71a6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Lint + +on: pull_request + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Setup Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Install and lint + run: | + yarn + yarn lint diff --git a/package.json b/package.json index 04a0f8c..1c8d93f 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,12 @@ "deploy": "gcloud app deploy --project=excalidraw-room", "fix": "yarn prettier --write", "gcp-build": "tsc -p .", + "lint": "yarn prettier --list-different", "prepare": "yarn gcp-build", "pretest": "yarn gcp-build", "prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"", "start": "node ./index.js", - "test": "yarn prettier --list-different" + "test": "yarn lint" }, "version": "1.0.0" }