v2 스캐폴드 추가 (tsconfig 4종, eslint, prettier, vitest)

TypeScript strict + electron-vite + Vitest 환경을 위한 설정 파일 추가.
tsconfig 4종: 베이스/cli/node(main+preload)/web(renderer) 역할 분담.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 15:39:01 +09:00
parent 08b5538e49
commit 8e67d25b3b
7 changed files with 82 additions and 0 deletions

17
.eslintrc.cjs Normal file
View File

@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: { node: true, es2022: true },
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
},
overrides: [
{
files: ['src/renderer/**/*.tsx', 'src/renderer/**/*.ts'],
env: { browser: true },
},
],
};

6
.prettierrc Normal file
View File

@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "es5"
}

12
tsconfig.cli.json Normal file
View File

@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "node",
"outDir": "out/cli",
"rootDir": "src",
"declaration": false,
"types": ["node"]
},
"include": ["src/core/**/*", "src/cli/**/*"]
}

15
tsconfig.json Normal file
View File

@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"module": "CommonJS",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": "."
},
"exclude": ["node_modules", "out", "dist"]
}

11
tsconfig.node.json Normal file
View File

@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"lib": ["ES2022"],
"module": "CommonJS",
"moduleResolution": "bundler",
"types": ["node"]
},
"include": ["src/main/**/*", "src/preload/**/*", "src/core/**/*", "electron.vite.config.ts"]
}

12
tsconfig.web.json Normal file
View File

@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"types": ["node"]
},
"include": ["src/renderer/**/*"]
}

9
vitest.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node',
include: ['src/**/__tests__/**/*.test.ts'],
globals: true,
},
});