Skip to content

Commit def3342

Browse files
committed
build: add development configuration files
- Add TypeScript configuration with strict mode - Configure Vitest for testing with coverage - Add Biome for linting and formatting - Include .gitignore for Node.js projects - Add .editorconfig for consistent code style
1 parent 855886d commit def3342

File tree

5 files changed

+219
-0
lines changed

5 files changed

+219
-0
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
indent_style = tab
13+
indent_size = 4
14+
tab_width = 4
15+
16+
# YAML files (must use spaces)
17+
[*.{yml,yaml}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
# Markdown files (spaces required for lists and code blocks)
22+
[*.md]
23+
indent_style = space
24+
indent_size = 2
25+
trim_trailing_whitespace = false
26+
27+
# Makefile (must use tabs)
28+
[Makefile]
29+
indent_style = tab

.gitignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp.*
4+
.yarn/*
5+
!.yarn/patches
6+
!.yarn/plugins
7+
!.yarn/releases
8+
!.yarn/sdks
9+
!.yarn/versions
10+
.yarn/install-state.gz
11+
12+
# TypeScript
13+
dist/
14+
build/
15+
*.tsbuildinfo
16+
17+
# Logs
18+
logs/
19+
*.log
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
lerna-debug.log*
24+
.pnpm-debug.log*
25+
26+
# Diagnostic reports
27+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
28+
29+
# Runtime data
30+
pids/
31+
*.pid
32+
*.seed
33+
*.pid.lock
34+
35+
# Testing
36+
coverage/
37+
*.lcov
38+
.nyc_output/
39+
40+
# Caches
41+
.cache/
42+
.parcel-cache/
43+
.next/
44+
.nuxt/
45+
.vuepress/dist/
46+
.docusaurus/
47+
.serverless/
48+
.fusebox/
49+
.dynamodb/
50+
.tern-port
51+
.vscode-test/
52+
.sass-cache/
53+
.eslintcache
54+
.stylelintcache
55+
.npm/
56+
57+
# Environment files
58+
.env
59+
.env.local
60+
.env.*.local
61+
62+
# OS files
63+
.DS_Store
64+
Thumbs.db
65+
66+
# Editor files
67+
*.swp
68+
*.swo
69+
*~
70+
.idea/
71+
.vscode/
72+
73+
# Temporary files
74+
*.tmp
75+
*.temp
76+
.tmp/
77+
.temp/
78+
79+
# Optional npm cache directory
80+
.npm/
81+
82+
# Optional eslint cache
83+
.eslintcache
84+
85+
# Output of 'npm pack'
86+
*.tgz
87+
88+
# Yarn Integrity file
89+
.yarn-integrity
90+
91+
# Claude memory files
92+
.claude/
93+
CLAUDE.md

biome.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true,
10+
"style": {
11+
"noNonNullAssertion": "off"
12+
},
13+
"complexity": {
14+
"noBannedTypes": "off"
15+
}
16+
}
17+
},
18+
"formatter": {
19+
"enabled": true,
20+
"formatWithErrors": true,
21+
"indentStyle": "tab",
22+
"indentWidth": 4,
23+
"lineWidth": 100,
24+
"lineEnding": "lf"
25+
},
26+
"javascript": {
27+
"formatter": {
28+
"quoteStyle": "single",
29+
"semicolons": "always",
30+
"trailingCommas": "all",
31+
"arrowParentheses": "always"
32+
}
33+
},
34+
"json": {
35+
"formatter": {
36+
"trailingCommas": "none"
37+
}
38+
},
39+
"files": {
40+
"ignore": [
41+
"node_modules",
42+
"dist",
43+
"coverage",
44+
"*.min.js",
45+
"yarn.lock",
46+
"package-lock.json",
47+
"pnpm-lock.yaml",
48+
"CHANGELOG.md",
49+
"**/*.yml",
50+
"**/*.yaml",
51+
"**/*.md"
52+
]
53+
}
54+
}

tsconfig.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ES2022",
5+
"moduleResolution": "node",
6+
"lib": ["ES2022"],
7+
"outDir": "./dist",
8+
"rootDir": "./src",
9+
"strict": true,
10+
"esModuleInterop": true,
11+
"skipLibCheck": true,
12+
"forceConsistentCasingInFileNames": true,
13+
"declaration": true,
14+
"declarationMap": true,
15+
"sourceMap": true,
16+
"allowSyntheticDefaultImports": true,
17+
"resolveJsonModule": true
18+
},
19+
"include": ["src/**/*"],
20+
"exclude": ["node_modules", "dist", "tests"]
21+
}

vitest.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineConfig } from 'vitest/config';
2+
3+
export default defineConfig({
4+
test: {
5+
coverage: {
6+
provider: 'v8',
7+
reporter: ['text', 'json', 'html', 'lcov'],
8+
exclude: [
9+
'node_modules/',
10+
'dist/',
11+
'**/*.test.ts',
12+
'**/*.d.ts',
13+
'vitest.config.ts',
14+
],
15+
all: true,
16+
lines: 80,
17+
functions: 80,
18+
branches: 80,
19+
statements: 80,
20+
},
21+
},
22+
});

0 commit comments

Comments
 (0)