Add an end-to-end integration harness that runs the webmail against a real Stalwart mail server in Docker and drives it with Playwright, focused on the mail/folder synchronisation behaviour (unread/total counters, folder-list sync, account-scoped Unified Mailbox) that the unified-mailbox work touches. - integration/ stack: Stalwart (declarative bootstrap: alice/bob/carol, submission + IMAP listeners, permissive CORS) + webmail (dev mode, so the browser's plaintext cross-origin JMAP calls aren't blocked by the prod CSP). - Helpers: dependency-free SMTP submit client, JMAP client for seeding / inspecting server state, and page helpers (login, add/switch account, locale-independent folder-counter reads). - Specs: login, single-account sync (receive/read/move/delete/folder-create/ burst) and multi-account (per-account isolation + cross-account Unified Inbox aggregation + background-account delivery). 12 tests, all green. - Add focused data-testid hooks to the mail UI (folder rows + counters, email list items, account switcher, composer) for stable selectors. - Exclude examples/ and integration/ from tsconfig/eslint/.dockerignore.
87 lines
2.0 KiB
JavaScript
87 lines
2.0 KiB
JavaScript
import js from "@eslint/js";
|
|
import tseslint from "@typescript-eslint/eslint-plugin";
|
|
import tsparser from "@typescript-eslint/parser";
|
|
import reactPlugin from "eslint-plugin-react";
|
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
React: "readonly",
|
|
JSX: "readonly",
|
|
NodeJS: "readonly",
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tseslint,
|
|
react: reactPlugin,
|
|
"react-hooks": reactHooksPlugin,
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-empty-object-type": "off",
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
"no-unused-vars": "off",
|
|
"no-undef": "off",
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
|
|
languageOptions: {
|
|
globals: {
|
|
describe: "readonly",
|
|
it: "readonly",
|
|
expect: "readonly",
|
|
beforeEach: "readonly",
|
|
afterEach: "readonly",
|
|
vi: "readonly",
|
|
test: "readonly",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
".next/**",
|
|
"node_modules/**",
|
|
"repos/**",
|
|
"data/admin/plugins/**",
|
|
"public/**/*.js",
|
|
"*.config.js",
|
|
"*.config.mjs",
|
|
"e2e/**",
|
|
"local-data/**/*.mjs",
|
|
"benchmark/**",
|
|
"examples/**",
|
|
"integration/**",
|
|
],
|
|
},
|
|
];
|