code_formatter
Otomatik kod formatlama, Prettier/ESLint entegrasyonu ve kod stil tutarlılığı rehberi.
npxskills add vuralserhat86/antigravity-agentic-skills--skill code_formatterLoading…
Otomatik kod formatlama, Prettier/ESLint entegrasyonu ve kod stil tutarlılığı rehberi.
npxskills add vuralserhat86/antigravity-agentic-skills--skill code_formatterLoading…
Otomatik kod formatlama ve stil tutarlılığı rehberi.
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80,
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
# 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/**/*"
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',
},
};
# Lint
npx eslint src/
# Lint and fix
npx eslint src/ --fix
# Specific files
npx eslint "src/**/*.{ts,tsx}"
{
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,css,md}": [
"prettier --write"
]
}
}
npx husky-init && npm install
npx husky add .husky/pre-commit "npx lint-staged"
node_modules/
dist/
build/
.next/
coverage/
*.min.js
node_modules/
dist/
build/
*.config.js
Code Formatter v1.1 - Enhanced
Kaynak: Prettier Docs
prettier, eslint ve ilgili pluginleri kur..prettierrc ve .eslintrc dosyalarını kök dizine ekle..prettierignore dosyasına build/, dist/ ekle.package.json içine format ve lint scriptlerini ekle..vscode/settings.json ile "Format on Save" aç.npm run lint ve prettier --check adımlarını ekle.| 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? |
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).