← スキル一覧に戻る

common-pitfalls
by bwl21
This CT-Extenion can create Flyers from Appointments/Events in Churchtools
⭐ 0🍴 0📅 2026年1月6日
SKILL.md
name: common-pitfalls description: Apply when debugging errors, reviewing code for issues, or encountering unexpected behavior. Contains known mistakes with ChurchTools API, Vue components, TypeScript, Safari cookies, and form handling.
Common Pitfalls
ChurchTools API
| Pitfall | Wrong | Correct |
|---|---|---|
| Nested params | { params: { key: 'val' } } | { key: 'val' } |
| Delete method | churchtoolsClient.delete() | churchtoolsClient.deleteApi() |
| Tags response | response.data | response (direct array) |
| Tag domains | 'appointment' | 'person' | 'song' | 'group' |
Vue Components
| Pitfall | Wrong | Correct |
|---|---|---|
| Button type | <button> | <button type="button"> |
| BaseCard import | Absolute path | Relative: ../common/BaseCard.vue |
| Reactivity | Plain objects | ref() or reactive() |
TypeScript
- Check
src/ct-types.d.tsfor ChurchTools types - Always define interfaces for API responses
- Use strict typing for all data
Build Issues
- Verify import paths after moving components
- Check for missing dependencies in package.json
- Ensure all required fields in API requests
Safari-specific
- Blocks
Secure; SameSite=Nonecookies onhttp://localhost - Blocks third-party cookies from different domains
- Solution: Use Vite proxy + HTTPS
Form Submission
Buttons without type="button" will submit forms and cause page reloads:
<!-- Wrong - triggers form submission -->
<button @click="handleClick">Click</button>
<!-- Correct -->
<button type="button" @click="handleClick">Click</button>
API Error Handling
Always wrap API calls in try-catch with loading states:
try {
loading.value = true
// API call
} catch (err) {
error.value = 'User-friendly message'
console.error('Debug info:', err)
} finally {
loading.value = false
}
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です