Skip to content

Commit

Permalink
Run linter and formatting check on webif/ too
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Oct 6, 2023
1 parent aa72830 commit e93a7cb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
prettier:
name: Check formatting with Prettier
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Check formatting
run: npm run prettier-check
eslint:
name: Run eslint
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -35,3 +35,36 @@ jobs:
run: npm ci
- name: Run eslint
run: npm run lint
webif-prettier:
name: Check web interface formatting
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webif
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run prettier-check
webif-eslint:
name: Lint web interface
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webif
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Run eslint
run: npm run lint

3 changes: 2 additions & 1 deletion webif/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint .",
"format": "prettier --plugin-search-dir . --write ."
"prettier": "prettier --write src/",
"prettier-check": "prettier --check src/"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
Expand Down

0 comments on commit e93a7cb

Please sign in to comment.