Skip to content

Commit c21ab9a

Browse files
committed
ci: lint repository tooling and trim rust cache
1 parent 50d2931 commit c21ab9a

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/scripts/workflow.mjs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -774,11 +774,27 @@ function verifyProject() {
774774
ensureFrontendDependencies();
775775
run('npm', ['run', 'format:check'], { cwd: srcDir });
776776
run('npm', ['run', 'typecheck'], { cwd: srcDir });
777-
run('npm', ['run', 'lint'], { cwd: srcDir });
777+
lintProject();
778778
run('npm', ['run', 'test'], { cwd: srcDir });
779779
run('npm', ['run', 'build:bundle'], { cwd: srcDir });
780780
}
781781

782+
function lintProject() {
783+
run('npm', ['--prefix', 'src', 'run', 'lint']);
784+
run('npm', [
785+
'--prefix',
786+
'src',
787+
'exec',
788+
'--',
789+
'eslint',
790+
'--config',
791+
'src/eslint.config.js',
792+
'.github/scripts',
793+
'.github/commitlint.config.js',
794+
'--no-ignore',
795+
]);
796+
}
797+
782798
function setupProject() {
783799
runDoctor();
784800
run('npm', ['ci'], { cwd: srcDir });
@@ -805,7 +821,7 @@ Tasks:
805821
release:checksums Generate SHA256 checksums for release bundles
806822
release:verify-hardening Validate release hardening settings
807823
run Launch the built app artifact
808-
lint Run frontend lint checks
824+
lint Run frontend and repository tooling lint checks
809825
format Format frontend files
810826
format:check Check frontend formatting
811827
test Run frontend tests
@@ -897,7 +913,7 @@ Tasks:
897913
runReleaseBinary();
898914
},
899915
lint() {
900-
run('npm', ['--prefix', 'src', 'run', 'lint']);
916+
lintProject();
901917
},
902918
format() {
903919
run('npm', ['--prefix', 'src', 'run', 'format']);

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
uses: Swatinem/rust-cache@919333daf4640a6fca9dd8b87468dc776e46b44b # node24
4343
with:
4444
workspaces: "src-tauri -> target"
45+
cache-targets: false
4546

4647
- name: Install Dependencies
4748
run: |
@@ -92,6 +93,7 @@ jobs:
9293
uses: Swatinem/rust-cache@919333daf4640a6fca9dd8b87468dc776e46b44b # node24
9394
with:
9495
workspaces: "src-tauri -> target"
96+
cache-targets: false
9597

9698
- name: Clippy (Strict Linting)
9799
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
uses: Swatinem/rust-cache@919333daf4640a6fca9dd8b87468dc776e46b44b # node24
7575
with:
7676
workspaces: "src-tauri -> target"
77+
cache-targets: false
7778

7879
- name: Install frontend dependencies
7980
run: |

src/eslint.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ export default [
103103
},
104104
},
105105
{
106-
files: ['scripts/**/*.{js,mjs}'],
106+
files: ['scripts/**/*.{js,mjs}', '../.github/**/*.{js,mjs}', '.github/**/*.{js,mjs}'],
107107
languageOptions: {
108108
globals: {
109109
...globals.node,
110110
},
111111
},
112+
rules: {
113+
'no-console': 'off',
114+
},
112115
},
113116
eslintConfigPrettier,
114117
];

0 commit comments

Comments
 (0)