// ESLint for the terminal (plan step 3.1b): the same rules as the manager and the waiter. // All of src is checked (new code). import js from '@eslint/js' import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import { defineConfig, globalIgnores } from 'eslint/config' export default defineConfig([ globalIgnores(['dist', 'dev-dist']), { files: ['**/*.{js,jsx}'], extends: [ js.configs.recommended, reactHooks.configs.flat.recommended, reactRefresh.configs.vite, ], languageOptions: { ecmaVersion: 2020, globals: globals.browser, parserOptions: { ecmaVersion: 'latest', ecmaFeatures: { jsx: true }, sourceType: 'module', }, }, rules: { 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]', argsIgnorePattern: '^[A-Z_]' }], // components passed as props (Icon) // Loading data in an effect (`useEffect(() => { load() }, [load])`, setState after the // await) is flagged too; it's what the screens do, so a warning, as in the manager. 'react-hooks/set-state-in-effect': 'warn', }, }, { files: ['tests/**/*.mjs', '*.config.js'], languageOptions: { globals: globals.node }, }, ])