-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// src/components/ErrorExample.tsx | ||
|
||
import React, { useState } from 'react'; | ||
|
||
// lint 에러 발생: 사용하지 않는 import | ||
import { Button } from './Button'; | ||
Check warning on line 6 in apps/web/src/ErrorExample.tsx GitHub Actions / check
|
||
|
||
// TypeScript 에러 발생: 타입 정의 누락 | ||
export const ErrorExample = (props) => { | ||
// lint 에러 발생: 선언했지만 사용하지 않는 상태 | ||
const [count, setCount] = useState(0); | ||
Check warning on line 11 in apps/web/src/ErrorExample.tsx GitHub Actions / check
|
||
|
||
// TypeScript 에러 발생: 타입 불일치 | ||
const handleClick = (event: number) => { | ||
console.log(event); | ||
}; | ||
|
||
// lint 에러 발생: | ||
// - console.log 사용 | ||
// - 불필요한 세미콜론 사용 (eslint 설정에 따라) | ||
console.log('rendering'); | ||
|
||
// TypeScript 에러 발생: children의 타입이 지정되지 않음 | ||
return <div onClick={handleClick}>{props.children}</div>; | ||
Check failure on line 24 in apps/web/src/ErrorExample.tsx GitHub Actions / check
Check failure on line 24 in apps/web/src/ErrorExample.tsx GitHub Actions / check
|
||
}; |