import js from "@eslint/js"; import tseslint from "typescript-eslint"; import hooks from "eslint-plugin-react-hooks"; import globals from "globals"; // 생성물은 검사하지 않고 직접 작성한 코드만 검사한다. 브라우저와 Node의 // 실행 경계를 파일별로 지정하여 실수로 서버 전용 API를 앱에서 쓰지 않게 한다. export default tseslint.config( { ignores: [ "dist/**", "node_modules/**", ".cache/**", ".venv-audio/**", "test-results/**", "playwright-report/**", ], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ["**/*.{ts,tsx}"], languageOptions: { globals: globals.browser } }, { files: ["**/*.{js,mjs}", "*config.ts", "tests/**"], languageOptions: { globals: globals.node }, }, { files: ["src/**/*.{ts,tsx}"], plugins: { "react-hooks": hooks }, rules: hooks.configs.recommended.rules, }, );