Skip to content
Snippets Groups Projects
Commit d1360dd6 authored by Uku Taht's avatar Uku Taht
Browse files

Run npm lint and format in CI

parent 9c2fd9ac
No related branches found
No related tags found
No related merge requests found
name: NPM CI
on:
push:
branches: [master, stable]
pull_request:
branches: [master, stable]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .tool-versions
uses: marocchino/tool-versions-action@v1
id: versions
- name: Set up Node
- uses: actions/setup-node@v2
with:
node-version: ${{steps.versions.outputs.nodejs}}
- run: npm install
- run: npm run lint
- run: npm run check-format
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"deploy": "$(npm bin)/webpack --mode production", "deploy": "$(npm bin)/webpack --mode production",
"watch": "$(npm bin)/webpack --mode development --watch", "watch": "$(npm bin)/webpack --mode development --watch",
"format": "$(npm bin)/prettier --write {css,js}/**", "format": "$(npm bin)/prettier --write {css,js}/**",
"check-format": "$(npm bin)/prettier --check {css,js}/**",
"lint": "$(npm bin)/eslint js/**" "lint": "$(npm bin)/eslint js/**"
}, },
"dependencies": { "dependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment