Skip to content

Commit 356e80f

Browse files
authored
Merge pull request #1 from kluth/claude/setup-framework-from-readme-011CUrH7VuUsiyb7oeMdod1J
Initial Setup
2 parents 98f82e6 + 662db84 commit 356e80f

28 files changed

Lines changed: 2379 additions & 0 deletions

.eslintrc.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2022,
5+
"sourceType": "module",
6+
"project": "./tsconfig.eslint.json"
7+
},
8+
"plugins": ["@typescript-eslint", "prettier"],
9+
"extends": [
10+
"eslint:recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
13+
"plugin:@typescript-eslint/strict",
14+
"prettier"
15+
],
16+
"rules": {
17+
"prettier/prettier": "error",
18+
"@typescript-eslint/explicit-function-return-type": "error",
19+
"@typescript-eslint/no-explicit-any": "error",
20+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
21+
"@typescript-eslint/strict-boolean-expressions": "error",
22+
"@typescript-eslint/no-floating-promises": "error",
23+
"@typescript-eslint/no-misused-promises": "error",
24+
"@typescript-eslint/await-thenable": "error",
25+
"@typescript-eslint/no-unnecessary-condition": "error",
26+
"@typescript-eslint/prefer-nullish-coalescing": "error",
27+
"@typescript-eslint/prefer-optional-chain": "error",
28+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
29+
"@typescript-eslint/consistent-type-imports": "error",
30+
"no-console": ["warn", { "allow": ["warn", "error"] }],
31+
"eqeqeq": ["error", "always"],
32+
"no-var": "error",
33+
"prefer-const": "error",
34+
"prefer-arrow-callback": "error"
35+
},
36+
"overrides": [
37+
{
38+
"files": ["**/*.test.ts", "**/*.spec.ts"],
39+
"rules": {
40+
"@typescript-eslint/no-unsafe-assignment": "off",
41+
"@typescript-eslint/no-unsafe-member-access": "off",
42+
"@typescript-eslint/no-unsafe-call": "off",
43+
"@typescript-eslint/no-unsafe-return": "off",
44+
"@typescript-eslint/no-unsafe-argument": "off",
45+
"@typescript-eslint/explicit-function-return-type": "off",
46+
"@typescript-eslint/no-explicit-any": "off"
47+
}
48+
}
49+
],
50+
"ignorePatterns": ["dist", "node_modules", "*.js"]
51+
}

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
reviewers:
11+
- "maintainers"
12+
labels:
13+
- "dependencies"
14+
- "automated"
15+
commit-message:
16+
prefix: "chore"
17+
include: "scope"
18+
19+
# Enable version updates for GitHub Actions
20+
- package-ecosystem: "github-actions"
21+
directory: "/"
22+
schedule:
23+
interval: "weekly"
24+
day: "monday"
25+
open-pull-requests-limit: 5
26+
reviewers:
27+
- "maintainers"
28+
labels:
29+
- "dependencies"
30+
- "github-actions"
31+
- "automated"
32+
commit-message:
33+
prefix: "ci"

.github/workflows/ci.yml

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop, 'claude/**']
6+
pull_request:
7+
branches: [main, develop]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v1
22+
with:
23+
bun-version: latest
24+
25+
- name: Install dependencies
26+
run: bun install
27+
28+
- name: Run ESLint
29+
run: bun run lint
30+
31+
- name: Check formatting
32+
run: bun run format:check
33+
34+
type-check:
35+
name: Type Check
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Bun
42+
uses: oven-sh/setup-bun@v1
43+
with:
44+
bun-version: latest
45+
46+
- name: Install dependencies
47+
run: bun install
48+
49+
- name: Run TypeScript compiler
50+
run: bun run type-check
51+
52+
test:
53+
name: Test
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest, macos-latest, windows-latest]
58+
bun-version: [latest]
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Setup Bun
64+
uses: oven-sh/setup-bun@v1
65+
with:
66+
bun-version: ${{ matrix.bun-version }}
67+
68+
- name: Install dependencies
69+
run: bun install
70+
71+
- name: Run tests
72+
run: bun test
73+
74+
- name: Generate coverage report
75+
if: matrix.os == 'ubuntu-latest'
76+
run: bun test --coverage
77+
78+
- name: Upload coverage to Codecov
79+
if: matrix.os == 'ubuntu-latest'
80+
uses: codecov/codecov-action@v4
81+
with:
82+
file: ./coverage/coverage-final.json
83+
flags: unittests
84+
name: codecov-umbrella
85+
86+
build:
87+
name: Build
88+
runs-on: ubuntu-latest
89+
needs: [lint, type-check, test]
90+
steps:
91+
- name: Checkout code
92+
uses: actions/checkout@v4
93+
94+
- name: Setup Bun
95+
uses: oven-sh/setup-bun@v1
96+
with:
97+
bun-version: latest
98+
99+
- name: Install dependencies
100+
run: bun install
101+
102+
- name: Build project
103+
run: bun run build
104+
105+
- name: Build type declarations
106+
run: bun run build:types
107+
108+
- name: Upload build artifacts
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: dist
112+
path: dist/
113+
retention-days: 7
114+
115+
security:
116+
name: Security Scan
117+
runs-on: ubuntu-latest
118+
permissions:
119+
contents: read
120+
security-events: write
121+
actions: read
122+
steps:
123+
- name: Checkout code
124+
uses: actions/checkout@v4
125+
126+
- name: Run Trivy vulnerability scanner
127+
uses: aquasecurity/trivy-action@master
128+
with:
129+
scan-type: 'fs'
130+
scan-ref: '.'
131+
format: 'sarif'
132+
output: 'trivy-results.sarif'
133+
134+
- name: Upload Trivy results to GitHub Security
135+
uses: github/codeql-action/upload-sarif@v3
136+
if: always()
137+
with:
138+
sarif_file: 'trivy-results.sarif'

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CodeQL Analysis
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
- cron: '0 0 * * 1' # Weekly on Monday
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: ['javascript']
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: security-extended,security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v3
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v3
40+
with:
41+
category: "/language:${{matrix.language}}"

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
release:
14+
name: Create Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Bun
23+
uses: oven-sh/setup-bun@v1
24+
with:
25+
bun-version: latest
26+
27+
- name: Install dependencies
28+
run: bun install
29+
30+
- name: Run tests
31+
run: bun test
32+
33+
- name: Build project
34+
run: bun run build
35+
36+
- name: Build type declarations
37+
run: bun run build:types
38+
39+
- name: Create GitHub Release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: Release ${{ github.ref }}
46+
draft: false
47+
prerelease: false
48+
49+
- name: Publish to NPM
50+
if: success()
51+
run: |
52+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
53+
npm publish --access public
54+
env:
55+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Dependencies
2+
node_modules/
3+
package-lock.json
4+
yarn.lock
5+
pnpm-lock.yaml
6+
7+
# Build output
8+
dist/
9+
build/
10+
*.tsbuildinfo
11+
12+
# Testing
13+
coverage/
14+
.nyc_output/
15+
16+
# IDE
17+
.vscode/
18+
.idea/
19+
*.swp
20+
*.swo
21+
*~
22+
.DS_Store
23+
24+
# Environment
25+
.env
26+
.env.local
27+
.env.*.local
28+
29+
# Logs
30+
logs/
31+
*.log
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
36+
# Temporary files
37+
*.tmp
38+
.cache/

.husky/pre-commit

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env sh
2+
3+
echo "🧠 Running pre-commit checks..."
4+
5+
# Run linting
6+
echo "📝 Linting code..."
7+
npm run lint || exit 1
8+
9+
# Run formatting check
10+
echo "💅 Checking code formatting..."
11+
npm run format:check || exit 1
12+
13+
# Run type checking
14+
echo "🔍 Type checking..."
15+
npm run type-check || exit 1
16+
17+
# Run tests
18+
echo "🧪 Running tests..."
19+
npm test || exit 1
20+
21+
echo "✅ All pre-commit checks passed!"

.husky/pre-push

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
3+
echo "🚀 Running pre-push checks..."
4+
5+
# Run full test suite with coverage
6+
echo "🧪 Running full test suite..."
7+
npm run test:coverage || exit 1
8+
9+
# Build the project
10+
echo "🔨 Building project..."
11+
npm run build || exit 1
12+
13+
echo "✅ All pre-push checks passed! Safe to push."

0 commit comments

Comments
 (0)