Skip to content
File

Blob: eslint.config.js

javascript39 lines
1import js from "@eslint/js";
2import reactHooks from "eslint-plugin-react-hooks";
3import reactRefresh from "eslint-plugin-react-refresh";
4import globals from "globals";
5import tseslint from "typescript-eslint";
6 
7export 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);