-
Notifications
You must be signed in to change notification settings - Fork 2
[eslint-*] v2 rc bugs #75
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
Comments
@NaverPayDev/frontend , eslint-plugin-react-hooks@5부터 eslint@9를 의존성으로 갖고 있는데 eslint-plugin-react-hooks@5부터 컴포넌트 이름이 반드시 대문자이어야하는 룰이 추가됐네요. 한글이름을 가진 컴포넌트도 고려가 되어야해서 상황이 꼬였는데요. 관련해서 코멘트를 남기긴 했지만 개인적인 의견으로는 |
rules-of-hooks 가 대문자로 시작하는 컴포넌트명만 인식하는건가요? |
facebook/react#25162 (comment) 크으 간지.. 음..어렵네요 영어가 근본이긴한데, overriding 해서 warning 처리만 할까요?? |
네, 이전에는 소문자로 시작하는 게 아니면 됐었는데, 이제는 대문자로 시작해야만 컴포넌트로 판단하네요.. https://github.com/facebook/react/pull/25162/files#diff-5649cc9bc31063c1139ad0f91e98add9c77f641281cba934123db8aeade0b97eR49 |
@2-one-week 님, 그냥 룰을 끄는 건 아니고 warn 처리 하자는 말씀이시죠? |
네넵 근데 저는 끄는 것도 괜찮다고 생각합니다 ㅋㅋㅋ 어차피 다들 습관적으로 영어로 하면 대문자로 하고 있어서?? |
이게 너무 개인적인 생각이라 말씀주신 것처럼 warn 도 좋을 것 같.. |
이거 그러면 react-hooks plugin 버전 저희가 고정하고, pnpm patch 처리해서 유니코드면 true 처리하도록 할까요? |
근데 이거 끈채로 배포할수는 없어서... |
저는 메이저 가는김에 그냥 한글명 컴포넌트 다 바꾸라고 하는 것에 한표하겠습니다 |
요건 그러면 영어 컴포넌트 강제일까요? C_계피...? |
영어로요? 안돼~ react-hooks/rules-of-hooks: 'off' |
근데 rule-of-hooks 내부에 useState나 effect deps 도 포함되어 있는거 아녀요?? |
|
컨트리뷰션 가즈아~ 한국인 좀 살려줘~ |
아뇨, rule-of-hooks은 컴포넌트 내부에서 훅쓰는 것만 ! effect deps은 별도 룰로 있습니다. |
일단 meta 의견에 맞게 대문자만 허용하는 걸로가고... 어떻게 대응할 지는 사용하는 쪽에서 선택하는 걸로..! |
예써 |
Uh oh!
There was an error while loading. Please reload this page.
한글 컴포넌트에서 에러 발생 [eslint-plugin-react-hooks] only allow capitalized component names facebook/react#25162
Error: React Hook "useState" is called in function "한글" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use". react-hooks/rules-of-hooks
The text was updated successfully, but these errors were encountered: