fix(eslint): reduce warnings in GitHub Actions deployment

- Disable formatting rules (handled by Prettier)
- Relaxed strict Vue/JS rules for demo code compatibility
- Fix syntax errors in ApiPlayground and VoiceCloningDemo
- Fix duplicate else-if condition in ApiPlayground
- Fix Promise executor async pattern in AutoregressiveAudioDemo
- Add TypeScript file support to ESLint config

Warnings reduced from 295 to 251 problems.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
sanbuphy
2026-02-18 17:38:10 +08:00
parent 8b01686e68
commit 0eba9e87e9
456 changed files with 28450 additions and 9677 deletions
@@ -13,7 +13,9 @@
<div class="demo-content">
<div class="performance-comparison">
<div class="comparison-section">
<div class="section-title"> 不好的做法</div>
<div class="section-title">
不好的做法
</div>
<div class="code-block">
<div class="code-line">
<span class="code-comment">// 触发重排和重绘</span>
@@ -22,30 +24,39 @@
<span class="code-keyword">function</span> <span class="code-func">animate</span>() {
</div>
<div class="code-line">
<span class="code-indent"></span>element.style.width = <span class="code-string">'100px'</span>
<span class="code-indent" />element.style.width = <span class="code-string">'100px'</span>
</div>
<div class="code-line">
<span class="code-indent"></span>element.style.height = <span class="code-string">'100px'</span>
<span class="code-indent" />element.style.height = <span class="code-string">'100px'</span>
</div>
<div class="code-line">
<span class="code-indent"></span><span class="code-func">requestAnimationFrame</span>(animate)
<span class="code-indent" /><span class="code-func">requestAnimationFrame</span>(animate)
</div>
<div class="code-line">
}
</div>
</div>
<div class="performance-meter bad">
<div class="meter-label">性能开销</div>
<div class="meter-label">
性能开销
</div>
<div class="meter-bar">
<div class="meter-fill bad-fill" style="width: 90%"></div>
<div
class="meter-fill bad-fill"
style="width: 90%"
/>
</div>
</div>
</div>
<div class="vs-divider">VS</div>
<div class="vs-divider">
VS
</div>
<div class="comparison-section">
<div class="section-title good"> 优化做法</div>
<div class="section-title good">
优化做法
</div>
<div class="code-block">
<div class="code-line">
<span class="code-comment">/* 只触发合成 */</span>
@@ -54,26 +65,33 @@
<span class="code-keyword">function</span> <span class="code-func">animate</span>() {
</div>
<div class="code-line">
<span class="code-indent"></span>element.style.transform = <span class="code-string">'translate3d(0,0,0)'</span>
<span class="code-indent" />element.style.transform = <span class="code-string">'translate3d(0,0,0)'</span>
</div>
<div class="code-line">
<span class="code-indent"></span><span class="code-func">requestAnimationFrame</span>(animate)
<span class="code-indent" /><span class="code-func">requestAnimationFrame</span>(animate)
</div>
<div class="code-line">
}
</div>
</div>
<div class="performance-meter good">
<div class="meter-label">性能开销</div>
<div class="meter-label">
性能开销
</div>
<div class="meter-bar">
<div class="meter-fill good-fill" style="width: 15%"></div>
<div
class="meter-fill good-fill"
style="width: 15%"
/>
</div>
</div>
</div>
</div>
<div class="optimization-tips">
<div class="tips-title">黄金法则</div>
<div class="tips-title">
黄金法则
</div>
<div class="tips-list">
<div class="tip-item">
<span class="tip-icon">1</span>