Add GitHub action for linting (#8)
This commit is contained in:
parent
123b2ea4e0
commit
19fec67ceb
20
.github/workflows/lint.yml
vendored
Normal file
20
.github/workflows/lint.yml
vendored
Normal file
@ -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
|
@ -30,11 +30,12 @@
|
|||||||
"deploy": "gcloud app deploy --project=excalidraw-room",
|
"deploy": "gcloud app deploy --project=excalidraw-room",
|
||||||
"fix": "yarn prettier --write",
|
"fix": "yarn prettier --write",
|
||||||
"gcp-build": "tsc -p .",
|
"gcp-build": "tsc -p .",
|
||||||
|
"lint": "yarn prettier --list-different",
|
||||||
"prepare": "yarn gcp-build",
|
"prepare": "yarn gcp-build",
|
||||||
"pretest": "yarn gcp-build",
|
"pretest": "yarn gcp-build",
|
||||||
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
|
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
|
||||||
"start": "node ./index.js",
|
"start": "node ./index.js",
|
||||||
"test": "yarn prettier --list-different"
|
"test": "yarn lint"
|
||||||
},
|
},
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user