Skip to content

ddotx/dev-typescript-node

Repository files navigation

TypeScript Node Project Setup

https://khalilstemmler.com/blogs/typescript/node-starter-project/


Eslint

npm install --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin

touch .eslintrc

touch .eslintignore

plugin

npm install --save-dev eslint-plugin-no-loops

Prettier

https://khalilstemmler.com/blogs/tooling/prettier/

npm install --save-dev prettier
touch .prettierrc

Formatting using VSCode on save

"editor.formatOnPaste": true,
"editor.formatOnSave": true,

Formatting using an filesystem watcher

npm install --save-dev onchange

Configuring Prettier to work with ESLint

npm install --save-dev eslint-config-prettier eslint-plugin-prettier

Hasky

https://typicode.github.io/husky/

npm install husky --save-dev

# enable Git hooks
npx husky install

Automate Git hooks package.json

npm pkg set scripts.prepare="husky install"

create a pre-commit hook

npx husky add .husky/pre-commit "npm run lint"

git add .husky/pre-commit

About

typescript-starter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published