Skip to content

Commit

Permalink
feat: check workflow error 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Nov 9, 2024
1 parent c853e7a commit ac88102
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions apps/web/src/ErrorExample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// src/components/ErrorExample.tsx

import React, { useState } from 'react';

Check warning on line 3 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

'React' is defined but never used

// lint 에러 발생: 사용하지 않는 import
import { Button } from './Button';

Check warning on line 6 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

'Button' is defined but never used

Check failure on line 6 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

Unable to resolve path to module './Button'

// TypeScript 에러 발생: 타입 정의 누락
export const ErrorExample = (props) => {
// lint 에러 발생: 선언했지만 사용하지 않는 상태
const [count, setCount] = useState(0);

Check warning on line 11 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

'count' is assigned a value but never used

Check warning on line 11 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

'setCount' is assigned a value but never used

// TypeScript 에러 발생: 타입 불일치
const handleClick = (event: number) => {
console.log(event);

Check failure on line 15 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

Unexpected console statement
};

// lint 에러 발생:
// - console.log 사용
// - 불필요한 세미콜론 사용 (eslint 설정에 따라)
console.log('rendering');

Check failure on line 21 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

Unexpected console statement

// TypeScript 에러 발생: children의 타입이 지정되지 않음
return <div onClick={handleClick}>{props.children}</div>;

Check failure on line 24 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

Visible, non-interactive elements with click handlers must have at least one keyboard listener

Check failure on line 24 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element

Check failure on line 24 in apps/web/src/ErrorExample.tsx

View workflow job for this annotation

GitHub Actions / check

'children' is missing in props validation
};

0 comments on commit ac88102

Please sign in to comment.