feat: initial dev-configs monorepo

Shared configs for TypeScript projects: ESLint, Prettier, TypeScript,
Vite, Jest, Playwright, Knip. Published as @vigdorov/* npm packages
to Gitea registry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 23:40:22 +03:00
commit cf64bf6d7d
38 changed files with 11287 additions and 0 deletions

View File

@ -0,0 +1,19 @@
{
"name": "@vigdorov/playwright-config",
"version": "1.0.0",
"description": "Shared Playwright configuration",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"scripts": {
"build": "tsc"
},
"peerDependencies": {
"@playwright/test": ">=1.40.0"
},
"devDependencies": {
"@playwright/test": "^1.52.0",
"typescript": "^5.8.3"
}
}

View File

@ -0,0 +1,29 @@
import type {PlaywrightTestConfig} from '@playwright/test';
export interface PlaywrightConfigOptions {
baseURL: string;
testDir?: string;
retries?: number;
}
export function playwrightConfig(options: PlaywrightConfigOptions): PlaywrightTestConfig {
const {baseURL, testDir = 'e2e', retries} = options;
const isCI = !!process.env.CI;
return {
testDir,
timeout: 30_000,
retries: retries ?? (isCI ? 2 : 0),
reporter: isCI ? 'html' : 'list',
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{name: 'chromium', use: {browserName: 'chromium'}},
{name: 'firefox', use: {browserName: 'firefox'}},
{name: 'webkit', use: {browserName: 'webkit'}},
],
};
}

View File

@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}