Skip to content
Back to skills

Collection

ASecurity

ESLintとPrettierの統合とフォーマット自動化の専門知識。 責務分離、競合解決、エディタ統合、保存時自動実行を設計します。 📚 リソース参照: このスキルには以下のリソースが含まれています。 必要に応じて該当するリソースを参照してください: - `.claude/skills/prettier-integration/resources/automation-strategies.md`: Prettier Automation Strategies - `.claude/skills/prettier-integration/resources/conflict-resolution.md`: Prettier-ESLint Conflict Resolution - `.claude/skills/prettier-integration/resources/editor-integration.md`: Prettier Editor Integration - `.claude/skills/prettier-integration/scripts/for...

  • 24 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolsjavascripttypescriptjavabashnodegitci/cd

Works with

  • vscode

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-4abb9a39/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-4abb9a39)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: .claude/skills/prettier-integration/SKILL.md
description: |
  ESLintとPrettierの統合とフォーマット自動化の専門知識。
  責務分離、競合解決、エディタ統合、保存時自動実行を設計します。

  📚 リソース参照:
  このスキルには以下のリソースが含まれています。
  必要に応じて該当するリソースを参照してください:

  - `.claude/skills/prettier-integration/resources/automation-strategies.md`: Prettier Automation Strategies
  - `.claude/skills/prettier-integration/resources/conflict-resolution.md`: Prettier-ESLint Conflict Resolution
  - `.claude/skills/prettier-integration/resources/editor-integration.md`: Prettier Editor Integration
  - `.claude/skills/prettier-integration/scripts/format-check.mjs`: Prettierフォーマット検証スクリプト
  - `.claude/skills/prettier-integration/templates/prettierrc-base.json`: prettierrc-base設定ファイル
  - `.claude/skills/prettier-integration/templates/vscode-settings.json`: vscode-settings設定ファイル

  使用タイミング:
  - ESLintとPrettierを統合する時
  - フォーマットルールの競合を解決する時
  - エディタでの保存時自動フォーマットを設定する時
  - lint/formatの責務を分離する時
  - 自動フォーマット適用戦略を設計する時
version: 1.0.0
---

# Prettier Integration Skill

## 概要

このスキルは、ESLint と Prettier の責務分離と効果的な統合戦略を提供します。

## 責務分離の原則

### ESLint 役割

- **コード品質**: 論理エラー、潜在的バグの検出
- **保守性**: 複雑度、関数長、命名規約の検証
- **ベストプラクティス**: アンチパターンの検出

### Prettier 役割

- **コードフォーマット**: インデント、改行、スペース
- **視覚的一貫性**: スタイルの統一
- **スタイル**: クォート、セミコロン、括弧の配置

## 統合戦略

### アプローチ 1: 競合解決(推奨)

**eslint-config-prettier を使用**:

```json
{
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "prettier" // 最後に配置してPrettierと競合するルールを無効化
  ]
}
```

**メリット**:

- ESLint と Prettier を独立実行
- 責務が明確に分離
- パフォーマンス最適化可能

### アプローチ 2: 実行分離

**package.json スクリプト**:

```json
{
  "scripts": {
    "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
    "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\""
  }
}
```

**実行順序**: `pnpm lint` → `pnpm format`

### アプローチ 3: エディタ統合

**VSCode 設定例** (.vscode/settings.json):

```json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}
```

**動作フロー**:

1. 保存時に自動フォーマット(Prettier)
2. ESLint 自動修正(--fix)
3. 残るエラーを表示

## 競合ルールの解決

### Prettier に委譲すべき ESLint ルール

以下のルールは無効化(eslint-config-prettier が自動対応):

- `indent`: Prettier が管理
- `quotes`: Prettier が管理
- `semi`: Prettier が管理
- `max-len`: Prettier が管理
- `comma-dangle`: Prettier が管理
- `arrow-parens`: Prettier が管理
- `object-curly-spacing`: Prettier が管理

### 共存可能な ESLint ルール

以下は ESLint で管理(Prettier と競合しない):

- `no-unused-vars`: ロジックチェック
- `no-console`: コード品質
- `complexity`: 複雑度制限
- `max-lines-per-function`: 保守性

## 自動フォーマット適用

### コミットフック統合(lint-staged)

```json
{
  "lint-staged": {
    "*.{ts,tsx,js,jsx}": ["eslint --fix", "prettier --write"],
    "*.{json,md}": ["prettier --write"]
  }
}
```

### CI/CD 統合

```yaml
# GitHub Actions例
- name: Check formatting
  run: pnpm format:check

- name: Lint code
  run: pnpm lint
```

## 詳細リソース

```bash
# 競合解決ガイド
cat .claude/skills/prettier-integration/resources/conflict-resolution.md

# エディタ統合パターン
cat .claude/skills/prettier-integration/resources/editor-integration.md

# 自動化戦略
cat .claude/skills/prettier-integration/resources/automation-strategies.md
```

## テンプレート

```bash
# Prettier基本設定
cat .claude/skills/prettier-integration/templates/prettierrc-base.json

# VSCode設定
cat .claude/skills/prettier-integration/templates/vscode-settings.json
```

## スクリプト

```bash
# フォーマット検証
node .claude/skills/prettier-integration/scripts/format-check.mjs [target-directory]
```

## 関連スキル

- `.claude/skills/eslint-configuration/SKILL.md`: ESLint ルール設定
- `.claude/skills/commit-hooks/SKILL.md`: コミットフック統合
- `.claude/skills/code-style-guides/SKILL.md`: スタイルガイド選択

## 参考文献

- **Prettier 公式ドキュメント**: https://prettier.io/docs/
- **eslint-config-prettier**: https://github.com/prettier/eslint-config-prettier
- **『Maintainable JavaScript』** Nicholas C. Zakas 著

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.