Browse Source

add more jobs to check for good code

pull/1250/head
Bernd Storath 9 months ago
parent
commit
693daa55db
  1. 50
      .github/workflows/lint.yml
  2. 4
      src/package.json

50
.github/workflows/lint.yml

@ -33,3 +33,53 @@ jobs:
cd src cd src
pnpm install pnpm install
pnpm lint pnpm lint
typecheck:
name: Typecheck
runs-on: ubuntu-latest
if: github.repository_owner == 'wg-easy'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
check-latest: true
cache: "pnpm"
- name: pnpm lint
run: |
cd src
pnpm install
pnpm typecheck
formatcheck:
name: Check format
runs-on: ubuntu-latest
if: github.repository_owner == 'wg-easy'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
check-latest: true
cache: "pnpm"
- name: pnpm lint
run: |
cd src
pnpm install
pnpm format:check

4
src/package.json

@ -14,7 +14,9 @@
"preview": "nuxt preview", "preview": "nuxt preview",
"postinstall": "nuxt prepare", "postinstall": "nuxt prepare",
"lint": "eslint .", "lint": "eslint .",
"format": "prettier . --write" "format": "prettier . --write",
"format:check": "prettier . --check",
"typecheck": "nuxt typecheck"
}, },
"dependencies": { "dependencies": {
"@nuxtjs/i18n": "^8.3.3", "@nuxtjs/i18n": "^8.3.3",

Loading…
Cancel
Save