Notice
Recent Posts
Recent Comments
Link
250x250
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- npm start
- googleicon
- git lab clone
- npm install 문제
- owlcarousel
- maxwidth
- react npm install
- package.json
- 그누보드반응형
- 이미지반응형
- 글자들여쓰기
- 의존성문제
- window 정책변경
- slickslider
- 단어단위로떨어지기
- 동적객체
- legacy-peer
- Git clone
- minwidth
- node설치
- npm install
- XEIcon
- fontawesome
- 웹아이콘
- vscode git clone
- MediaQuery
- 정적객체
- 플러그인
- node 오류
- 아이콘사용법
Archives
- Today
- Total
어쩌다 알게 된 ƪ(•̃͡•̃͡ ƪ
[React] 해당 줄에서만 eslint 경고 끄기 본문
728x90
// eslint-disable-next-line react/jsx-props-no-spreading
코드한줄
=> 바로 다음 한 줄에 대해서만 eslint 경고 꺼줌
// eslint-disable-next-line react/jsx-props-no-spreading
<MyComponent {...props} />
<AnotherComponent {...otherProps} /> // 🔥 이 줄은 다시 경고가 나옴!
=> 한 줄이 컴포넌트라고 하더라도 컴포넌트를 사용한 한 줄에만 적용되고 컴포넌트 전체 코드에는 적용되지 않음
/* eslint-disable react/jsx-props-no-spreading */
코드
.
.
.
/* eslint-disable react/jsx-props-no-spreading */
=> 주석 안에 코드에 대해서 eslint 경고 꺼줌
/* eslint-disable react/jsx-props-no-spreading */
<MyComponent {...props} />
<AnotherComponent {...props2} />
/* eslint-enable react/jsx-props-no-spreading */728x90
'개발 > 🟦 React' 카테고리의 다른 글
| [React] default export와 named export (0) | 2025.04.25 |
|---|---|
| [React] 라이브러리 import classNames from 'classnames'; (0) | 2025.04.24 |
| [React] drag&drop sortable 리액트 라이브러리 , react-sortable-hoc (0) | 2025.04.12 |
| [React] useFormik, Formik, 폼 요소에서 쓰이는 라이브러리 (0) | 2025.04.12 |
| [React] 기본 로딩(import), 지연 로딩(lazy) (0) | 2025.04.11 |
Comments
