From c5d8445960de668c1199f5c5da4047dd645f5b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20=C3=85berg?= Date: Tue, 16 Dec 2025 00:57:27 +0100 Subject: [PATCH] Try running with eslint and prettier caching --- .github/workflows/lint.yml | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f2e6db96b30..1a2ebb8cf0b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -73,6 +73,24 @@ jobs: - name: Install Node dependencies run: npm ci + - name: Cache ESLint + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: .eslintcache + key: ${{ runner.os }}-eslint-${{ hashFiles('eslint.config.mjs') }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-eslint-${{ hashFiles('eslint.config.mjs') }}- + ${{ runner.os }}-eslint- + + - name: Cache Prettier + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: node_modules/.cache/prettier + key: ${{ runner.os }}-prettier-${{ hashFiles('.prettierrc.json') }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-prettier-${{ hashFiles('.prettierrc.json') }}- + ${{ runner.os }}-prettier- + - name: Lint unowned dependencies run: npm run lint:dep-ownership diff --git a/package.json b/package.json index cd1262ac373..45f16aa79b1 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "homepage": "https://bitwarden.com", "scripts": { "prepare": "husky", - "lint": "eslint . --cache --cache-strategy content && prettier --check .", + "lint": "eslint . --cache --cache-strategy content && prettier --cache --check .", "lint:fix": "eslint . --cache --cache-strategy content --fix", "lint:clear": "rimraf .eslintcache", "prettier": "prettier --cache --write .",