-
-
Notifications
You must be signed in to change notification settings - Fork 24
husky, pre-commit rules 적용 #375
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
Conversation
|
|
너무 좋은 것 같습니다, mdx 관련 사용이 서투른 상태라서 관련 내용을 놓치고 있었습니다 이후 braillify에도 적용이 필요하다고 생각합니다 devup ui에 우선 뱡합하겠습니다 많은 이들이 lint 관련 이슈에 수고를 덜게 될 것 같습니다 |
|
타 린트 이슈도 수정을 부탁드립니다 |
husky lint-staged eslint-plugin-jsonc eslint-plugin-mdx jsonc-eslint-parser @typescript-eslint/parser
|
@owjs3901 린트에러 확인해서 올렸습니다. 늦게 올려서 죄송합니다.
|
|
@owjs3901 build 문제 원인은 eslint scope을 잘못 설정해서 전체 파일을 모두 lint 체크를 하던 것이었습니다. src 폴더 하위로 모두 적용해두었습니다. |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
@owjs3901 착각했던 부분에 대해 설명드리면
src로 범위를 좁혔을때 문제없이 통과된 이유는 files 경로를 잘못 적용한 부분입니다. 아울러 landing 폴더 하위 파일들에 있는 lint에러도 모두 수정하여 올립니다. |
- cleanup eslint rule configuration
- @typescript-eslint/parser - jsonc-eslint-parser
|
난잡하게 적용되었던 rules 정리하고, 불필요한 parser들도 모두 정리했습니다. |
husky, pre-commit 적용했습니다.
제가 의도한 바는 md 또는 mdx 문서 내 codeblock 에 작성된 코드도 devup-eslint 룰을 따라야한다고 생각했는데, md,mdx 문서 내 codeblock을 제어하려면 별도의 eslint-plugin-mdx 패키지를 설치해야하는 문제가 있었습니다.
devup-eslint 라이브러리에는 해당 룰이 적용되어 있지 않아서 제가 임의로 필요한 패키지들을 설치하긴했는데, 만약 husky를 적용하실 생각이 있으시다면 devup-eslint 룰 내에 반영이 필요할 것 같습니다.
또한, mdx rule을 적용하게되면
<Box />와 같은 태그를 사용할 땐 tsx로 codeblock을 생성해야 parsing 에러가 없어서 임의로 수정하여 올렸습니다.아울러, json 관련된 rule도 없다보니 제 ide에 적용된 룰이 저장시 자꾸 반영되는 문제가 있었는데,
임의로 끄기는 싫고 강제하고자 json도 룰을 적용해보았습니다.
관련해서 코멘트 부탁드립니다!