orbit/eslint.config.js
reverse c122458e30
add playwright e2e tests against a local ergo ircv3 server
drives the built client over websocket like production: connect, join,
send and echo a message, and deliver a message between two clients. ergo
is fetched and started by the test harness; run with npm run test:e2e.
2026-06-20 21:05:01 +00:00

33 lines
1.2 KiB
JavaScript

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'
export default defineConfig([
globalIgnores(['dist', 'plugin-template', 'e2e', 'playwright.config.ts']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: globals.browser,
},
rules: {
// IRC formatting/CTCP legitimately uses control characters in regexes.
'no-control-regex': 'off',
// react-hooks v7's new "react-compiler" rules are valuable but aggressive;
// keep them visible as warnings rather than hard CI failures.
'react-hooks/refs': 'warn',
'react-hooks/purity': 'warn',
'react-hooks/set-state-in-effect': 'warn',
// Dev-only fast-refresh hint (a couple of helper exports sit beside components).
'react-refresh/only-export-components': 'warn',
},
},
])