Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] husky, eslint 부착 #2 #3

Merged
merged 3 commits into from
Jan 18, 2023
Merged

[Feat] husky, eslint 부착 #2 #3

merged 3 commits into from
Jan 18, 2023

Conversation

uhgenie7
Copy link
Owner

Resolves #2

해결하려는 문제가 무엇인가요?

  • husky로 eslint에 반하는 커밋 푸시 막기

어떻게 해결했나요?

husky

셋업

yarn add husky -D
// package.json
{
  "scripts": {
    "prepare": "husky install"
  }
}
npx husky add .husky/pre-commit yarn lint-staged

lint

yarn add -D lint-staged
  "scripts": {
    "lint": "eslint src/**/*.{js,jsx,ts,tsx} --fix",
  },
  "lint-staged": {
    "*.{ts,tsx}": [
      "prettier --write",
      "eslint --fix"
    ]
  },

참고 자료

@uhgenie7 uhgenie7 merged commit 7664383 into master Jan 18, 2023
@uhgenie7 uhgenie7 added the feat label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

husky 부착
1 participant