diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b2dfe84..d8ceb11c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -64,7 +64,23 @@ jobs: with: name: apis path: ./src/lib/apis/generated - - run: npm run lint + - run: npm run lint:nofix + format: + name: Format + runs-on: ubuntu-latest + needs: [packages, genApi] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: npm + - run: SKIP_GENAPI=1 npm ci + - uses: actions/download-artifact@v4 + with: + name: apis + path: ./src/lib/apis/generated + - run: npm run format:nofix typeCheck: name: Type Check runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 02fe8cd2..65d9c2af 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ dist scripts/traPortfolio.v1.yaml src/lib/apis/generated + +.eslintcache diff --git a/package.json b/package.json index 77645420..db1f5237 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,10 @@ "dev": "concurrently \"vite\" \"npm run start-mock\"", "serve": "vite preview", "build": "vite build", - "lint": "eslint --fix --ext .ts,.vue src", - "lint:nofix": "eslint --ext .ts,.vue src", + "lint": "eslint --fix --cache --ext .ts,.vue src", + "lint:nofix": "eslint --cache --ext .ts,.vue src", + "format": "prettier --cache --write \"src/**/*.{vue,ts}\"", + "format:nofix": "prettier --cache --check \"src/**/*.{vue,ts}\"", "type-check": "vue-tsc --noEmit", "test": "vitest --passWithNoTests", "gen-api": "node scripts/generateApi.js", diff --git a/src/components/Layout/PageHeader.vue b/src/components/Layout/PageHeader.vue index 253f1e2d..711330d0 100644 --- a/src/components/Layout/PageHeader.vue +++ b/src/components/Layout/PageHeader.vue @@ -1,8 +1,8 @@