Pack a punch your project, following standards and specifications, linting and formatting your code, automating Git work flows, and improving your styles with emojis π¦
- π¨ ESLint & Prettier as linter and formatter
- πΆ Pre-Commit and Commit Husky hooks (Runs linter and formatter before any commit against staged files only!)
- π Commit nomenclature rules following Conventional Commit Format and Commitizen CLI (emoji powered)
- π Release management policy with commit-and-tag-version, including automagically CHANGELOG.md generation, version bumping and GitTags
- π¦ Included npm-check to check for outdated, incorrect, and unused dependencies.
- π₯·π» Included better-npm-audit to check for dependency vulnerabilities
npm ci # Install dependencies
npm run dev # Launch project locally
npm run lint # Run ESLint
npm run format # Run Prettier
git add . # Add files
npm run cz # Commit with Commitizen CLI
npm run release # Bump version and generate CHANGELOG.md
git push --follow-tags # Push changes and GitTag to origin
npm run npm:audit # Check dependency vulnerabilities
npm run npm:check # Check outdated dependencies
npm run build # Compile project
npm run start # Launch
- Install dependencies
npm install --save-dev @commitlint/cli @commitlint/config-conventional better-npm-audit commit-and-tag-version commitizen cz-conventional-changelog devmoji husky lint-staged npm-check
(Optional) Install ESLint and Prettier if you don't have them already:
npm install --save-dev prettier eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-sonarjs
- Copy the following scripts to your package.json file:
- format:staged
- npm:audit
- npm:check
- release
- cz
- devmoji
- prepare
(Optional) You can also copy
lint
andformat
commands if needed
- Copy the corresponding config files
cp -R {.husky,.commitlintrc.cjs,.czrc,.lintstagedrc.cjs} <YOUR_DESTINATION_FOLDER>
(Optional) Copy ESLint, Prettier and VSCode config files:
cp -R {.vscode,.prettierrc.cjs,.eslintrc.cjs}
<YOUR_DESTINATION_FOLDER>
- Prepare husky tools running:
npm run prepare