From 01198ee4c3b5ee878e2201fd901a7001620a646f Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 15 Nov 2024 00:34:52 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20eslint=20=EC=88=98=EC=A0=95=20ver?= =?UTF-8?q?=ED=98=B8=ED=99=98=EC=84=B1=20=EC=9D=B4=EC=8A=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.js | 68 +++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 470582a..810e074 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -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', - }, -}; +];