-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
47 lines (46 loc) · 1.17 KB
/
eslint.config.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// eslint.config.js
import typescriptPlugin from '@typescript-eslint/eslint-plugin'
import typescriptParser from '@typescript-eslint/parser'
import { defineConfig } from 'eslint-define-config'
import prettierPlugin from 'eslint-plugin-prettier'
import reactPlugin from 'eslint-plugin-react'
export default defineConfig([
{
files: ['src/**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
window: 'readonly',
document: 'readonly',
},
},
plugins: {
react: reactPlugin,
'@typescript-eslint': typescriptPlugin,
prettier: prettierPlugin,
},
settings: {
react: {
version: 'detect', // React 버전 자동 감지
},
},
rules: {
'prettier/prettier': 'error',
// ESLint 권장 설정 추가
'no-unused-vars': 'warn',
'no-console': 'off',
'react/react-in-jsx-scope': 'off',
},
},
{
files: ['src/**/*.{ts,tsx}'],
languageOptions: {
parser: typescriptParser,
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
])