import js from '@eslint/js' import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' import { defineConfig, globalIgnores } from 'eslint/config' // Deliberately stricter than steam-backlog-enforcer/web, which this was copied // from: that one extends only `tseslint.configs.recommended` and so runs no // type-aware rules at all. `strictTypeChecked` needs `projectService`, which is // why tsconfig.test.json exists — test files are outside tsconfig.app.json's // program and would otherwise be unlintable. export default defineConfig([ globalIgnores(['dist', 'coverage']), { files: ['**/*.{ts,tsx}'], extends: [ js.configs.recommended, tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked, reactHooks.configs.flat.recommended, reactRefresh.configs.vite, ], languageOptions: { globals: globals.browser, parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname, }, }, }, ])