-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
31 lines (30 loc) · 979 Bytes
/
eslint.config.js
File metadata and controls
31 lines (30 loc) · 979 Bytes
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
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
export default js.config(
{
ignores: ['dist'], // dist 폴더 무시
},
{
extends: [
'eslint:recommended',
'plugin:react/recommended',
],
plugins: {
'react-hooks': reactHooks.configs.recommended, // React Hooks ESLint 규칙
'react-refresh': reactRefresh, // React Refresh ESLint 플러그인
},
rules: {
'react-hooks/rules-of-hooks': 'error', // Hooks 사용 규칙 (필수)
'react-hooks/exhaustive-deps': 'warn', // 의존성 배열 경고
'react-refresh/only-export-components': 'warn', // React 컴포넌트 내에서만 export 경고
},
languageOptions: {
globals: {
...globals.browser, // 브라우저 환경 전역 변수 사용
...globals.node, // Node.js 전역 변수 사용
},
},
}
);