File
Blob: eslint.config.js
| 1 | import js from "@eslint/js"; |
| 2 | import reactHooks from "eslint-plugin-react-hooks"; |
| 3 | import reactRefresh from "eslint-plugin-react-refresh"; |
| 4 | import globals from "globals"; |
| 5 | import tseslint from "typescript-eslint"; |
| 6 | |
| 7 | export default tseslint.config( |
| 8 | { |
| 9 | ignores: ["dist/**", "playwright-report/**", "test-results/**"], |
| 10 | }, |
| 11 | { |
| 12 | files: ["src/client/**/*.{ts,tsx}"], |
| 13 | extends: [js.configs.recommended, ...tseslint.configs.recommended, reactHooks.configs.flat["recommended-latest"]], |
| 14 | languageOptions: { |
| 15 | ecmaVersion: "latest", |
| 16 | globals: globals.browser, |
| 17 | }, |
| 18 | rules: { |
| 19 | "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", ignoreRestSiblings: true }], |
| 20 | "react-hooks/refs": "error", |
| 21 | }, |
| 22 | }, |
| 23 | { |
| 24 | files: ["src/client/lib/ansi.ts"], |
| 25 | rules: { |
| 26 | "no-control-regex": "off", |
| 27 | }, |
| 28 | }, |
| 29 | { |
| 30 | files: ["src/client/**/*.tsx"], |
| 31 | plugins: { |
| 32 | "react-refresh": reactRefresh, |
| 33 | }, |
| 34 | rules: { |
| 35 | "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], |
| 36 | }, |
| 37 | }, |
| 38 | ); |