File tree Expand file tree Collapse file tree 3 files changed +18
-20
lines changed Expand file tree Collapse file tree 3 files changed +18
-20
lines changed Original file line number Diff line number Diff line change 25
25
}
26
26
},
27
27
"rules": {
28
+ "react/function-component-definition": "off",
29
+ // 이 함수형 컴포넌트를 어떤 함수 유형으로 사용할지 미리 정하고 rules에 명시해 두어야 에러가 발생하지 않는다. 따라서 그라운드 룰이 명확하지 않으면 사용하지 않는게 좋다.
28
30
"react/react-in-jsx-scope": "off",
29
31
"react/jsx-uses-react": "off",
30
32
"linebreak-style": 0,
50
52
"no-empty-pattern": 0,
51
53
"no-alert": 0,
52
54
"react-hooks/exhaustive-deps": 0,
53
- "prefer-arrow/prefer-arrow-functions": "error",
54
- "react/function-component-definition": ["error", {
55
- "named": "function-declaration",
56
- "unnamed": "arrow-function"
57
- }]
55
+ "prefer-arrow/prefer-arrow-functions": "error"
56
+ // "react/function-component-definition": ["error", {
57
+ // "named": "function-declaration",
58
+ // "unnamed": "arrow-function"
59
+ // }]
58
60
},
59
61
"settings": {
60
62
"import/parsers": {
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import logo from './logo.svg' ;
3
- import './App.css' ;
1
+ // import React from 'react';
2
+ // import logo from './logo.svg';
3
+ // import './App.css';
4
4
5
5
const App = ( ) => {
6
6
return (
7
- < div className = 'App' >
8
- < header className = 'App-header' >
9
- < img src = { logo } className = 'App-logo' alt = 'logo' />
10
- < p >
11
- Edit < code > src/App.tsx</ code > and save to reload.
12
- </ p >
13
- < a className = 'App-link' href = 'https://reactjs.org' target = '_blank' rel = 'noopener noreferrer' >
14
- Learn React
15
- </ a >
16
- </ header >
7
+ < div >
8
+ < span > test</ span >
17
9
</ div >
18
10
) ;
19
11
} ;
Original file line number Diff line number Diff line change 1
1
const myTest = ( ) => {
2
- return 'test' ;
2
+ return (
3
+ < div >
4
+ < span > test</ span >
5
+ </ div >
6
+ ) ;
3
7
} ;
4
8
5
- myTest ( ) ;
9
+ export default myTest ( ) ;
You can’t perform that action at this time.
0 commit comments