import tseslint from 'typescript-eslint'; import reactHooks from 'eslint-plugin-react-hooks'; export default tseslint.config({ files: ['src/**/*.{ts,tsx}', 'scripts/**/*.ts'], languageOptions: {parser: tseslint.parser}, plugins: { '@typescript-eslint': tseslint.plugin, 'react-hooks': reactHooks, }, rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'no-use-before-define': 'off', '@typescript-eslint/no-use-before-define': [ 'error', {functions: false, classes: false, typedefs: false, enums: false, variables: true}, ], 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', }, });