Skip to content

Commit 934344d

Browse files
committed
fix: 🐛 [FIX] @react/function-component-definition 설정 오류 개선
1 parent 9dae497 commit 934344d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/react/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ export default {
1818
'@react/button-has-type': 'error',
1919
// 컴포넌트는 항상 DisplayName를 가짐
2020
'@react/display-name': 'error',
21-
// 컴포넌트는 반드시 함수형으로 선언됨
21+
// 기명 컴포넌트는 함수형으로, 익명 컴포넌트는 애로우 메서드로 강제
2222
'@react/function-component-definition': [
2323
'error',
24-
'function'
24+
{
25+
namedComponents: 'function-declaration',
26+
unnamedComponents: 'arrow-function'
27+
}
2528
],
2629
// useState의 get, set 객체명은 대칭적으로 구성됨
2730
'@react/hook-use-state': 'error',

0 commit comments

Comments
 (0)