Skip to content

Commit 106c0c2

Browse files
committed
add eslint action
1 parent ddaa9c5 commit 106c0c2

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.github/actions/eslint/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: ESLint
2+
description: 'ESlint with caching'
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Cache ESLint
8+
uses: actions/cache@v4
9+
with:
10+
path: .eslintcache
11+
key: eslint-cache-${{ runner.os }}-${{ hashFiles('eslint.config.mjs', 'package.json', 'pnpm-lock.yaml') }}
12+
restore-keys: |
13+
eslint-cache-${{ runner.os }}-
14+
15+
- name: Run ESLint
16+
shell: bash
17+
run: pnpm lint --max-warnings=0 --cache

.github/workflows/ci-code-quality.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,8 @@ jobs:
1111
- uses: actions/checkout@v5
1212
- uses: ./.github/actions/setup
1313

14-
- name: Cache ESLint
15-
uses: actions/cache@v4
16-
with:
17-
path: .eslintcache
18-
key: eslint-cache-${{ runner.os }}-${{ hashFiles('eslint.config.mjs', 'package.json', 'pnpm-lock.yaml') }}
19-
restore-keys: |
20-
eslint-cache-${{ runner.os }}-
21-
22-
- name: Run ESLint
23-
run: pnpm lint --max-warnings=0 --cache
14+
- name: Run ESlint
15+
uses: ./.github/actions/eslint
2416

2517
- name: Run Spellcheck
2618
run: pnpm spellcheck

0 commit comments

Comments
 (0)