
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
my-typescript-library-starter
Advanced tools
A boilerplate for starting a TypeScript library, equipped with Vitest + ESLint + Commitizen + Husky + Release-it and generating beautiful change-log with Changelogen
A boilerplate (template starter) for starting a TypeScript library with ease; equipped with:
1) clone: first clone the repo (our used the github green button Use this template
on the top-right of this window and change project-related fields in package json.
[!IMPORTANT] After cloning the repo, replace
name
,version
,description
,author
,homepage
andrepository related links
fields inpackage.json
to use this template.
** ** Now enter repo's directory and install dependency using 'npm' or 'pnpm':
pnpm i
2) to build project:
pnpm build
3) to commit using commitizen-cli, after adding modified files to stage, enter pnpm commit
instead of git commit
:
git add .
pnpm commit
4) to release using release-it cli:
pnpm release
after releasing the change-log doc
automatically generated to CHANGELOG.md
file at the root of the project.
We use @antfu amazing eslint configuration. Js file eslint.config.js
configures the eslint
. It extends antfu's configuration but you can customize it. for example if you prefer to use double-quotations for string, change this file as:
import antfu from '@antfu/eslint-config'
export default antfu({
stylistic: {
quotes: 'double'
},
})
we use Commitizen
for conventional commits. husky
is used to enforce conventional commit messages with commitlint
.
Vitest
is used for running tests and measure test coverage.
coverage-v8
is used to obtain coverage metrics.
The test and coverage config file is vitest.config.ts
. for example to exclude config files in the root of project from coverage analysis, we config vitest.config.ts
like follow:
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
test: {
coverage: {
exclude: [
...configDefaults.exclude,
'*.config.js',
'*.config.ts',
],
},
},
})
We use release-it
for version management and publish to anywhere (npm or github). We also use its hooks to execute any command we need to test, build, and publish our project.
We use changelogen
to generate beautiful changelogs using Conventional Commits.
CSpell
used to automatically check for spelling errors when committing files and writing commit messages.
If there are spelling errors in the staged files for commit, husky
will prevent you from committing.
Also, if the commit message text has spelling errors, husky
will still prevent the commit.
Additional Notes:
cspell.json
file in your project directory.CSpell
to ignore in /project-words.txt
file.MIT License
v1.1.1
FAQs
A boilerplate for starting a TypeScript library, equipped with Vitest + ESLint + Commitizen + Husky + Release-it and generating beautiful change-log with Changelogen
The npm package my-typescript-library-starter receives a total of 0 weekly downloads. As such, my-typescript-library-starter popularity was classified as not popular.
We found that my-typescript-library-starter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.