Skip to content

Commit 95d2b51

Browse files
committed
Create scaffolding
0 parents  commit 95d2b51

12 files changed

Lines changed: 546 additions & 0 deletions

File tree

.github/workflows/check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
check:
13+
name: Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: oven-sh/setup-bun@v2
18+
- run: bun install --frozen-lockfile
19+
- run: bun run check

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store
35+
36+
# local files
37+
**/*.local.*
38+
39+
# build outputs
40+
dist

.oxfmtrc.jsonc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": false,
4+
"singleQuote": false,
5+
"trailingComma": "none",
6+
"tabWidth": 2,
7+
"printWidth": 80,
8+
"proseWrap": "always",
9+
"experimentalSortImports": {},
10+
"experimentalSortPackageJson": true,
11+
"ignorePatterns": []
12+
}

.oxlintrc.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"eslint",
5+
"import",
6+
"jsdoc",
7+
"node",
8+
"oxc",
9+
"promise",
10+
"typescript",
11+
"unicorn",
12+
"vitest"
13+
],
14+
"categories": {
15+
"correctness": "error",
16+
"perf": "warn",
17+
"suspicious": "warn",
18+
"pedantic": "off"
19+
},
20+
"rules": {
21+
"eslint-plugin-react/react-in-jsx-scope": "off",
22+
"typescript/no-explicit-any": "error",
23+
"typescript/no-misused-promises": "warn"
24+
},
25+
"overrides": [
26+
{
27+
"files": ["**/*.test.ts"],
28+
"rules": {
29+
"@typescript-eslint/no-explicit-any": "off"
30+
}
31+
},
32+
{
33+
"files": ["**/*.d.ts"],
34+
"rules": {
35+
"import/no-unassigned-import": "off"
36+
}
37+
}
38+
]
39+
}

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# CLAUDE.md
2+
3+
This is a starter kit for building a TypeScript application.
4+
5+
## Commands
6+
7+
```bash
8+
bun install # Install dependencies
9+
bun dev # Run application
10+
bun run build # Build for production (tsdown/rolldown build)
11+
bun test # Run tests (bun:test)
12+
13+
bun run check # Run all checks (format, lint, typecheck, test)
14+
bun run fix # Auto-fix format and lint issues
15+
bun run typecheck # TypeScript type checking
16+
bun run lint # Run oxlint with type-aware rules
17+
bun run format # Run oxfmt formatter
18+
```
19+
20+
## Coding Rules
21+
22+
- Use `bun` instead of `npm` or `pnpm`
23+
- Use strict TypeScript with `bun:test` for testing
24+
- NEVER cast with `any`
25+
- AVOID inline type casting with `as` - use valibot or zod for runtime
26+
validation
27+
- AVOID unnecessary try/catch
28+
- Document methods using TSDoc format with one newline after the description
29+
before params
30+
- Write tests first when fixing bugs or implementing features
31+
- All changes automatically get formatted with `oxfmt` (no semis, doublequotes)

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Matt Venables
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# startkit/typescript
2+
3+
A sane way to start your next TypeScript project. Fast, strict, and minimal.
4+
5+
## What's included
6+
7+
| Tool | Purpose |
8+
| -------------------------------------------------- | ------------------------ |
9+
| [Bun](https://bun.sh) | Runtime, test runner |
10+
| [tsdown](https://tsdown.dev) | Build (rolldown-based) |
11+
| [oxlint](https://oxc.rs/docs/guide/usage/linter) | Linting (type-aware) |
12+
| [oxfmt](https://oxc.rs/docs/guide/usage/formatter) | Formatting |
13+
| TypeScript 5 | Strict mode, all the way |
14+
15+
No ESLint. No Prettier. No slow tooling.
16+
17+
## Getting started
18+
19+
```bash
20+
# Install dependencies
21+
bun install
22+
23+
# Run the app
24+
bun dev
25+
26+
# Build for production
27+
bun run build
28+
29+
# Run the built output
30+
bun start
31+
```
32+
33+
## Scripts
34+
35+
```bash
36+
bun run check # Run all checks (format, lint, typecheck, test)
37+
bun run fix # Auto-fix format and lint issues
38+
bun run typecheck # TypeScript type checking
39+
bun run lint # Lint with type-aware rules
40+
bun run format # Format with oxfmt
41+
bun test # Run tests
42+
bun run outdated # Interactive dependency updates
43+
bun run clean # Clean build caches
44+
bun run nuke # Clean everything including node_modules
45+
```
46+
47+
## Project structure
48+
49+
```
50+
src/
51+
index.ts # Entry point
52+
tsconfig.json # Strict TypeScript config
53+
.oxlintrc.json # Linter config (correctness: error, perf: warn)
54+
.oxfmtrc.jsonc # Formatter config (no semis, double quotes)
55+
```
56+
57+
## Conventions
58+
59+
- Strict TypeScript -- no `any`, no `as` casts
60+
- No semicolons, double quotes
61+
- Imports are auto-sorted
62+
- Tests use `bun:test`
63+
64+
## License
65+
66+
MIT

0 commit comments

Comments
 (0)