Skip to content

Commit

Permalink
fix: eslint 버전 다운그레이드 및 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Nov 14, 2024
1 parent 01198ee commit b2dc893
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 218 deletions.
68 changes: 33 additions & 35 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,39 @@ 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'],
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,
},
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',
},
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',
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"axios": "^1.7.7",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"eslint": "8.0.0",
"framer-motion": "^11.11.13",
"lodash": "^4.17.21",
"lucide-react": "^0.445.0",
Expand Down Expand Up @@ -77,7 +78,6 @@
"@types/react-scroll": "^1.8.10",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
Expand Down
Loading

0 comments on commit b2dc893

Please sign in to comment.