← スキル一覧に戻る

code-formatter
by vuralserhat86
OS for Agents: 130+ Agentic Skills, Gemini Protocols, and Autonomous Workflows. (Antigravity System)
⭐ 19🍴 9📅 2026年1月23日
SKILL.md
name: code_formatter router_kit: FullStackKit description: Otomatik kod formatlama, Prettier/ESLint entegrasyonu ve kod stil tutarlılığı rehberi. metadata: skillport: category: development tags: [big data, cleaning, code formatter, csv, data analysis, data engineering, data science, database, etl pipelines, export, import, json, machine learning basics, migration, nosql, numpy, pandas, python data stack, query optimization, reporting, schema design, sql, statistics, transformation, visualization] - code-style
🎨 Code Formatter
Otomatik kod formatlama ve stil tutarlılığı rehberi.
📋 Prettier Yapılandırması
.prettierrc
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80,
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
Komutlar
# Format single file
npx prettier --write src/file.ts
# Format all files
npx prettier --write "src/**/*.{ts,tsx,js,jsx,json,css,md}"
# Check without writing
npx prettier --check "src/**/*"
🔧 ESLint Entegrasyonu
.eslintrc.js
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'prettier', // Prettier çakışmalarını devre dışı bırakır
],
plugins: ['@typescript-eslint', 'react'],
rules: {
'no-console': 'warn',
'no-unused-vars': 'error',
},
};
Komutlar
# Lint
npx eslint src/
# Lint and fix
npx eslint src/ --fix
# Specific files
npx eslint "src/**/*.{ts,tsx}"
🔄 Git Hooks (Husky + lint-staged)
package.json
{
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,css,md}": [
"prettier --write"
]
}
}
Setup
npx husky-init && npm install
npx husky add .husky/pre-commit "npx lint-staged"
📁 Ignore Files
.prettierignore
node_modules/
dist/
build/
.next/
coverage/
*.min.js
.eslintignore
node_modules/
dist/
build/
*.config.js
Code Formatter v1.1 - Enhanced
🔄 Workflow
Kaynak: Prettier Docs
Aşama 1: Installation
- Packages:
prettier,eslintve ilgili pluginleri kur. - Config:
.prettierrcve.eslintrcdosyalarını kök dizine ekle. - Ignore:
.prettierignoredosyasınabuild/,dist/ekle.
Aşama 2: Automation
- Scripts:
package.jsoniçineformatvelintscriptlerini ekle. - VS Code:
.vscode/settings.jsonile "Format on Save" aç. - Hooks: Husky ve lint-staged ile commit öncesi kontrol ekle.
Aşama 3: CI Integration
- Pipeline: CI sürecine
npm run lintveprettier --checkadımlarını ekle.
Kontrol Noktaları
| Aşama | Doğrulama |
|---|---|
| 1 | npm run format çalışınca dosyalar değişiyor mu? |
| 2 | Hatalı bir kod commit edilmeye çalışıldığında Husky engelliyor mu? |
| 3 | CI pipeline format hatası olduğunda fail ediyor mu? |
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です