Last active
February 14, 2023 12:26
-
-
Save ilkay-alti/c32be2dd8bf0614c35c523fb75996c30 to your computer and use it in GitHub Desktop.
husky lint-staged prettier eslint adding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add -D prettier eslint husky lint-staged | |
npm pkg set scripts.prepare="husky install" | |
if not git installation | |
git init | |
git add . | |
git commit -m "first commit" | |
npm run prepare | |
npx husky add .husky/pre-commit "yarn lint-staged --concurrent false" | |
git add .husky/pre-commit | |
git commit -m "Keep calm and commit" | |
create new file (name=".lintstagedrc") | |
{ | |
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix", "eslint"], | |
"*.json": ["prettier --write"] | |
} | |
npx eslint --init | |
yarn add -D @commitlint/config-conventional @commitlint/cli | |
create new file(name=commitlint.config.cjs) | |
module.exports = { | |
extends: ["@commitlint/config-conventional"], | |
}; | |
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ' | |
git commit -m "feat(Src): adding prettier eslint husky lintStaged" | |
feat: (kullanıcı için yeni özellik, yapı betiği için yeni bir özellik değil) | |
fix: (kullanıcı için hata düzeltmesi, derleme komut dosyası düzeltmesi değil) | |
docs: (belgelerdeki değişiklikler) | |
style: (biçimlendirme, eksik noktalı virgül vb; üretim kodu değişikliği yok) | |
refactor: (üretim kodunu yeniden düzenleme, örneğin bir değişkeni yeniden adlandırma) | |
test: (eksik testleri ekleme, testleri yeniden düzenleme; üretim kodu değişikliği yok) | |
chore: (homurdanma görevleri vb. güncelleniyor; üretim kodu değişikliği yok) | |
//https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment