diff --git a/web/core/.eslintrc.cjs b/web/core/.eslintrc.cjs index cd673bc..5d03c0d 100644 --- a/web/core/.eslintrc.cjs +++ b/web/core/.eslintrc.cjs @@ -5,7 +5,8 @@ module.exports = defineConfig({ root: true, env: { node: true, - browser: true + browser: true, + es2022: true }, extends: [ 'eslint:recommended', @@ -18,23 +19,35 @@ module.exports = defineConfig({ ignorePatterns: ['dist', 'dist-types'], overrides: [ { + files: ['*.ts', '*.tsx'], // Added *.tsx extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', + 'plugin:react/recommended' // Added React plugin ], - plugins: ['@typescript-eslint', 'import', 'react-refresh'], + plugins: ['@typescript-eslint', 'import', 'react-refresh', 'react'], parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', sourceType: 'module', + ecmaFeatures: { + jsx: true + }, + project: './tsconfig.json' // Add reference to your tsconfig + }, + settings: { + react: { + version: 'detect' + } }, - files: ['*.ts'], rules: { 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'off' }, }, { diff --git a/web/core/lib/editor/components/ui-select.tsx b/web/core/lib/editor/components/ui-select.tsx index cbe92e5..99d70d7 100644 --- a/web/core/lib/editor/components/ui-select.tsx +++ b/web/core/lib/editor/components/ui-select.tsx @@ -6,24 +6,31 @@ import { ChevronUpIcon, } from '@radix-ui/react-icons'; -export const BeSelect: React.FC = React.forwardRef( - ({ children, ...props }, forwardedRef) => { +interface BeSelectProps { + children: React.ReactNode; + [key: string]: any; +} + +export const BeSelect = React.forwardRef( + (props, forwardedRef) => { + const { children, ...rest } = props; + return ( - - - - - + + + + + - + {children} - +