Skip to content

Commit 6e6b4ca

Browse files
committed
Initial clean commit
0 parents  commit 6e6b4ca

23 files changed

+7096
-0
lines changed

.eslintrc.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 2020,
6+
"sourceType": "module"
7+
},
8+
"plugins": ["@typescript-eslint", "prettier"],
9+
"extends": ["eslint:recommended", "prettier"],
10+
"rules": {
11+
// TypeScript specific rules
12+
"@typescript-eslint/no-unused-vars": "error",
13+
"@typescript-eslint/no-explicit-any": "error",
14+
"@typescript-eslint/explicit-function-return-type": "warn",
15+
"@typescript-eslint/explicit-module-boundary-types": "warn",
16+
"@typescript-eslint/no-inferrable-types": "off",
17+
"@typescript-eslint/no-non-null-assertion": "warn",
18+
19+
// General ESLint rules
20+
"no-console": "warn",
21+
"no-debugger": "error",
22+
"no-duplicate-imports": "error",
23+
"no-unused-expressions": "error",
24+
"prefer-const": "error",
25+
"prefer-template": "error",
26+
"eqeqeq": ["error", "always"],
27+
"curly": ["error", "all"],
28+
29+
// Prettier integration
30+
"prettier/prettier": "error"
31+
},
32+
"env": {
33+
"node": true,
34+
"es2020": true
35+
},
36+
"overrides": [
37+
{
38+
"files": ["tests/**/*.ts", "**/*.test.ts", "**/*.spec.ts"],
39+
"env": {
40+
"jest": true
41+
},
42+
"rules": {
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-non-null-assertion": "off",
45+
"no-console": "off"
46+
}
47+
},
48+
{
49+
"files": ["*.js", "*.mjs"],
50+
"rules": {
51+
"@typescript-eslint/explicit-function-return-type": "off"
52+
}
53+
}
54+
]
55+
}

.gitignore

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
lerna-debug.log*
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage/
17+
*.lcov
18+
19+
# nyc test coverage
20+
.nyc_output
21+
22+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
23+
.grunt
24+
25+
# Bower dependency directory (https://bower.io/)
26+
bower_components
27+
28+
# node-waf configuration
29+
.lock-wscript
30+
31+
# Compiled binary addons (https://nodejs.org/api/addons.html)
32+
build/Release
33+
34+
# Dependency directories
35+
jspm_packages/
36+
37+
# TypeScript cache
38+
*.tsbuildinfo
39+
40+
# Optional npm cache directory
41+
.npm
42+
43+
# Optional eslint cache
44+
.eslintcache
45+
46+
# Optional stylelint cache
47+
.stylelintcache
48+
49+
# Microbundle cache
50+
.rpt2_cache/
51+
.rts2_cache_cjs/
52+
.rts2_cache_es/
53+
.rts2_cache_umd/
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# dotenv environment variable files
65+
.env
66+
.env.development.local
67+
.env.test.local
68+
.env.production.local
69+
.env.local
70+
71+
# parcel-bundler cache (https://parceljs.org/)
72+
.cache
73+
.parcel-cache
74+
75+
# Next.js build output
76+
.next
77+
out
78+
79+
# Nuxt.js build / generate output
80+
.nuxt
81+
dist
82+
83+
# Gatsby files
84+
.cache/
85+
86+
# Vuepress build output
87+
.vuepress/dist
88+
89+
# Serverless directories
90+
.serverless/
91+
92+
# FuseBox cache
93+
.fusebox/
94+
95+
# DynamoDB Local files
96+
.dynamodb/
97+
98+
# TernJS port file
99+
.tern-port
100+
101+
# Stores VSCode versions used for testing VSCode extensions
102+
.vscode-test
103+
104+
# yarn v2
105+
.yarn/cache
106+
.yarn/unplugged
107+
.yarn/build-state.yml
108+
.yarn/install-state.gz
109+
.pnp.*
110+
111+
# Build output
112+
dist/
113+
114+
# IDE
115+
.vscode/
116+
.idea/
117+
*.swp
118+
*.swo
119+
*~
120+
121+
# OS
122+
.DS_Store
123+
.DS_Store?
124+
._*
125+
.Spotlight-V100
126+
.Trashes
127+
ehthumbs.db
128+
Thumbs.db
129+
130+
# Tools
131+
.ai/

.npmignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# NPM ignore file - defines what should NOT be published to npm
2+
3+
# Source files (only publish built files)
4+
src/
5+
tests/
6+
.ai/
7+
8+
# Development configuration
9+
.eslintrc.json
10+
.prettierrc
11+
.prettierignore
12+
jest.config.js
13+
tsconfig*.json
14+
15+
# CI/CD configuration
16+
.github/
17+
18+
# Development artifacts
19+
coverage/
20+
*.log
21+
*.tsbuildinfo
22+
.eslintcache
23+
.nyc_output
24+
25+
# IDE and OS files
26+
.vscode/
27+
.idea/
28+
.DS_Store
29+
*.swp
30+
*.swo
31+
*~
32+
33+
# Git files
34+
.git/
35+
.gitignore
36+
37+
# Dependency files (npm will install these)
38+
node_modules/
39+
40+
# Development environment
41+
.env*
42+
43+
# Build tools output (keep only final dist)
44+
build/
45+
46+
# Documentation files to keep
47+
!README.md
48+
!LICENSE.md
49+
!CHANGELOG.md

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Ignore files for Prettier formatting
2+
node_modules/
3+
dist/
4+
coverage/
5+
*.log
6+
.DS_Store
7+
.env*
8+
.vscode/
9+
.idea/
10+
*.min.js
11+
*.min.css
12+
package-lock.json
13+
yarn.lock
14+
pnpm-lock.yaml

.prettierrc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"bracketSameLine": false,
10+
"arrowParens": "avoid",
11+
"endOfLine": "lf",
12+
"quoteProps": "as-needed",
13+
"jsxSingleQuote": true,
14+
"overrides": [
15+
{
16+
"files": ["*.json"],
17+
"options": {
18+
"singleQuote": false
19+
}
20+
},
21+
{
22+
"files": ["*.md"],
23+
"options": {
24+
"printWidth": 80,
25+
"proseWrap": "always"
26+
}
27+
}
28+
]
29+
}

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to
7+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8+
9+
## [Unreleased]
10+
11+
### Added
12+
13+
- Initial project structure and configuration
14+
- TypeScript setup with strict mode
15+
- Jest testing framework with 95%+ coverage requirement
16+
- ESLint and Prettier code quality tools
17+
- GitHub Actions CI/CD pipeline
18+
- Dependabot configuration for automated dependency updates
19+
- Comprehensive documentation (README, CONTRIBUTING, CODE_OF_CONDUCT)
20+
21+
### Features
22+
23+
- `greet(name?: string)` - Basic greeting function
24+
- `greetWithOptions(name?: string, options?: GreetingOptions)` - Advanced
25+
greeting with customization
26+
- `isValidName(name?: string)` - Name validation utility
27+
- Full TypeScript type definitions
28+
- Zero runtime dependencies
29+
30+
## [1.0.0] - 2025-01-01
31+
32+
### Added
33+
34+
- Initial release of the sandbox npm package
35+
- Complete demonstration of TypeScript npm package best practices
36+
- Educational resource for package development workflows
37+
38+
### Technical Details
39+
40+
- Node.js 18+ support
41+
- TypeScript 5.x with strict mode
42+
- Jest testing with comprehensive coverage
43+
- ESLint + Prettier code quality
44+
- GitHub Actions automation
45+
- NPM publishing workflow
46+
47+
---
48+
49+
**Note**: This changelog will be automatically updated as part of the release
50+
process. Each release will document new features, bug fixes, and breaking
51+
changes following conventional commit standards.

0 commit comments

Comments
 (0)