From e93a7cbae59bdec4b1db88fcff6a5dc0b4b7f221 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Fri, 6 Oct 2023 21:46:21 +0300 Subject: [PATCH] Run linter and formatting check on webif/ too --- .github/workflows/lint.yml | 37 +++++++++++++++++++++++++++++++++++-- webif/package.json | 3 ++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aaa47ae..3e8654f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ on: jobs: prettier: - name: Check formatting with Prettier + name: Check formatting runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -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 @@ -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 + diff --git a/webif/package.json b/webif/package.json index 9d164dc..80beb21 100644 --- a/webif/package.json +++ b/webif/package.json @@ -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",