Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/lint-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@ jobs:
${{ runner.os }}-eslint-changed-${{ hashFiles('eslint.changed.config.*', 'normalized-package-lock.json') }}-
${{ runner.os }}-eslint-changed-

# ESLint's cache doesn't track cross-file TypeScript dependencies, which can cause stale errors.
# If lint fails, we clear the cache and retry to rule out false positives.
# See: https://typescript-eslint.io/troubleshooting/faqs/eslint/#can-i-use-eslints---cache-with-typescript-eslint
- name: Run ESLint to check for deprecation warnings
run: npm run lint-changed
run: |
if ! npm run lint-changed; then
echo "Lint failed, clearing cache and retrying..."
rm -rf node_modules/.cache/eslint-changed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we track if we had to delete cache, and if yes, delete the remote cache as well so that in other PRs/branches it doesn't bother trying with the stale cache first?

@AndrewGable AndrewGable Jan 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will delete the stale cache (on this line), and then save the fresh cache once it's done with the retry, so not sure we need to delete the remote cache? What do you think?

npm run lint-changed
fi

- name: Save ESLint cache
# v4
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ jobs:
${{ runner.os }}-eslint-${{ hashFiles('eslint.config.*', 'normalized-package-lock.json') }}-
${{ runner.os }}-eslint-

# ESLint's cache doesn't track cross-file TypeScript dependencies, which can cause stale errors.
# If lint fails, we clear the cache and retry to rule out false positives.
# See: https://typescript-eslint.io/troubleshooting/faqs/eslint/#can-i-use-eslints---cache-with-typescript-eslint
- name: Lint JavaScript and Typescript with ESLint
run: npm run lint
run: |
if ! npm run lint; then
echo "Lint failed, clearing cache and retrying..."
rm -rf node_modules/.cache/eslint
npm run lint
fi
env:
CI: true

Expand Down
Loading