Skip to content

Commit

Permalink
fix: eslint 수정 ver호환성 이슈
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Nov 14, 2024
1 parent 198b6fc commit 01198ee
Showing 1 changed file with 35 additions and 33 deletions.
68 changes: 35 additions & 33 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,41 @@ import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';

import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

export default {
ignores: ['dist'],
extends: [
js.configs.recommended,
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'prettier',
],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
export default [
{
ignores: ['dist'],
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'jsx-a11y': jsxA11y,
js.configs.recommended,
typescript.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'jsx-a11y': jsxA11y,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'jsx-a11y/alt-text': ['warn', { elements: ['img'] }],
'jsx-a11y/aria-props': 'warn',
'jsx-a11y/aria-proptypes': 'warn',
'jsx-a11y/aria-unsupported-elements': 'warn',
'jsx-a11y/role-has-required-aria-props': 'warn',
'jsx-a11y/role-supports-aria-props': 'warn',
'react/no-unknown-property': 'off',
'react/prop-types': 'off',
},
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'jsx-a11y/alt-text': ['warn', { elements: ['img'] }],
'jsx-a11y/aria-props': 'warn',
'jsx-a11y/aria-proptypes': 'warn',
'jsx-a11y/aria-unsupported-elements': 'warn',
'jsx-a11y/role-has-required-aria-props': 'warn',
'jsx-a11y/role-supports-aria-props': 'warn',
'react/no-unknown-property': 'off',
'react/prop-types': 'off',
},
};
];

0 comments on commit 01198ee

Please sign in to comment.