ci: cache eslint lane

This commit is contained in:
Tianyi Cui
2026-07-06 03:07:35 +08:00
parent d71c96a44c
commit 1b9408268b
9 changed files with 37 additions and 8 deletions

View File

@@ -200,6 +200,20 @@ function ciArtifactGates(): Gate[] {
}
function lintGate(): Gate {
if (process.env.DSH_ESLINT_CACHE === '1') {
return pnpmExec('lint', [
'eslint',
'.',
'--cache',
'--cache-location',
'.cache/eslint/',
'--cache-strategy',
'content',
], {
label: 'lint',
env: { NODE_OPTIONS: nodeOptions('--max-old-space-size=8192') },
})
}
return pnpmScript('lint', 'lint', {
env: { NODE_OPTIONS: nodeOptions('--max-old-space-size=8192') },
})