Skip to content

Commit d792cf2

Browse files
committed
chore: initial boilerplate for DDD
1 parent f476f69 commit d792cf2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10743
-23
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 2
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
.docusaurus
4+
.coverage
5+
test/validator.test.js
6+

.eslintrc.cjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
parserOptions: {
5+
ecmaVersion: 2020,
6+
sourceType: 'module',
7+
},
8+
plugins: ['@typescript-eslint', 'prettier'],
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
'plugin:prettier/recommended',
13+
],
14+
env: {
15+
node: true,
16+
es6: true,
17+
},
18+
overrides: [
19+
{
20+
files: ['test/**/*.js', 'test/**/*.ts'],
21+
env: {
22+
jest: true,
23+
},
24+
},
25+
{
26+
files: ['src/types/**/*.ts', 'src/validation/**/*.ts', 'src/core/**/*.ts'],
27+
rules: {
28+
'@typescript-eslint/no-unused-vars': [
29+
'warn',
30+
{
31+
argsIgnorePattern: '^_',
32+
varsIgnorePattern: '^_',
33+
ignoreRestSiblings: true,
34+
args: 'none',
35+
caughtErrorsIgnorePattern: '^_',
36+
},
37+
],
38+
},
39+
},
40+
{
41+
files: ['src/commands/**/*.ts'],
42+
rules: {
43+
'@typescript-eslint/no-unused-vars': [
44+
'warn',
45+
{
46+
argsIgnorePattern: 'options',
47+
varsIgnorePattern: '^_',
48+
ignoreRestSiblings: true,
49+
args: 'after-used',
50+
caughtErrorsIgnorePattern: '^_',
51+
},
52+
],
53+
},
54+
},
55+
],
56+
rules: {
57+
'prettier/prettier': 'error',
58+
'@typescript-eslint/no-explicit-any': 'error',
59+
'no-unused-vars': 'warn',
60+
'@typescript-eslint/no-unused-vars': [
61+
'warn',
62+
{
63+
argsIgnorePattern: 'options',
64+
varsIgnorePattern: '^_',
65+
ignoreRestSiblings: true,
66+
args: 'after-used',
67+
caughtErrorsIgnorePattern: '^_',
68+
},
69+
],
70+
eqeqeq: ['error', 'always'],
71+
'consistent-return': 'error',
72+
'no-implicit-coercion': 'warn',
73+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
74+
},
75+
};
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Validate docs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
- '.github/workflows/**'
8+
- 'src/**'
9+
10+
jobs:
11+
validate:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Cache node modules
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
32+
- name: Build
33+
run: npm run build
34+
35+
- name: Format check
36+
run: npm run format:check
37+
38+
- name: Lint (CI)
39+
run: npm run lint:ci
40+
41+
- name: Run validator unit tests
42+
run: npm test
43+
44+
- name: List TODO (smoke)
45+
run: node dist/cli.js todo list || true

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional stylelint cache
57+
.stylelintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variable files
69+
.env
70+
.env.*
71+
!.env.example
72+
73+
# parcel-bundler cache (https://parceljs.org/)
74+
.cache
75+
.parcel-cache
76+
77+
# Next.js build output
78+
.next
79+
out
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and not Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# vuepress v2.x temp and cache directory
95+
.temp
96+
.cache
97+
98+
# Sveltekit cache directory
99+
.svelte-kit/
100+
101+
# vitepress build output
102+
**/.vitepress/dist
103+
104+
# vitepress cache directory
105+
**/.vitepress/cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# Firebase cache directory
120+
.firebase/
121+
122+
# TernJS port file
123+
.tern-port
124+
125+
# Stores VSCode versions used for testing VSCode extensions
126+
.vscode-test
127+
128+
# yarn v3
129+
.pnp.*
130+
.yarn/*
131+
!.yarn/patches
132+
!.yarn/plugins
133+
!.yarn/releases
134+
!.yarn/sdks
135+
!.yarn/versions
136+
137+
# Vite logs files
138+
vite.config.js.timestamp-*
139+
vite.config.ts.timestamp-*

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.dist
3+
.dist/**
4+
dist
5+
coverage
6+

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"tabWidth": 2,
6+
"semi": true
7+
}

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this repository will be documented in this file.
4+
5+
Format and process
6+
7+
- The `Unreleased` section contains completed tasks that have been removed from `TODO.md` and are targeted for the next release.
8+
- Each entry should include: task id, summary, author, PR or commit link, and a one-line description of the change.
9+
- When creating a release, move the entries from `Unreleased` to a new versioned section (e.g. `## [1.0.0] - 2025-09-20`) and include release notes.
10+
11+
Unreleased
12+
13+
- T-000 — Example task moved from TODO.md — PR: [owner/repo#123](https://github.com/owner/repo/pull/123) — Short description of change.
14+
15+
## Release history
16+
17+
No releases yet.

0 commit comments

Comments
 (0)