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/knip-config",
"version": "1.0.0",
"description": "Shared Knip configuration",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"scripts": {
"build": "tsc"
},
"peerDependencies": {
"knip": ">=5.0.0"
},
"devDependencies": {
"knip": "^5.51.0",
"typescript": "^5.8.3"
}
}

View File

@ -0,0 +1,22 @@
export interface KnipConfigOptions {
entry?: string[];
project?: string[];
ignore?: string[];
ignoreDependencies?: string[];
}
export function knipConfig(options: KnipConfigOptions = {}) {
const {
entry = ['src/index.ts'],
project = ['src/**/*.{ts,tsx,js,jsx}'],
ignore = [],
ignoreDependencies = [],
} = options;
return {
entry,
project,
ignore: ['**/*.test.*', '**/*.spec.*', 'e2e/**', '**/*.d.ts', ...ignore],
ignoreDependencies,
};
}

View File

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