// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format import js from '@eslint/js' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import storybook from 'eslint-plugin-storybook' import globals from 'globals' import tseslint from 'typescript-eslint' export default tseslint.config( { ignores: ['dist', 'src/lib/jm-api/**'] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], // Allow unused variables when they start with underscore '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], }, }, storybook.configs['flat/recommended'], )