플러그인 선택후 eslint 설치

eslint.config.js
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react/prop-types': 'off',
},
},
])
- rule안에 react/prop-types off로 설정
'frontend > react' 카테고리의 다른 글
| reactJs 확장프로그램 devtool 설치 (0) | 2025.12.15 |
|---|---|
| reactJs 프로젝트 경로 src '@' 설정 (0) | 2025.12.15 |
| react 프로젝트 세팅 (0) | 2025.12.15 |