-
Install eslint
- Install eslint: ng add @angular-eslint/schematics
- Check eslint: ng lint --fix
- Tạo file config cho eslint ở .eslintrc.json
- Tạo file ignore cho eslint ở .eslintignore
-
Install prettier
- npm install prettier --save-dev
- Check prettier: npx prettier --write .
- Tạo file config cho prettier ở .prettierrrc.json
-
Add prettier to eslint config
- npm install prettier-eslint eslint-config-prettier eslint-plugin-prettier --save-dev
- Add plugin prettier cho eslint:
-
Install husky
- npm install husky --save-dev
- npm install --save-dev pretty-quick husky
- npx husky-init
-
Install commitlint
- npx husky add .husky/commit-msg 'npx --no-install commitlint --edit'
- npm install @commitlint/config-conventional @commitlint/cli --dev
- Tạo file config cho commitlint .commitlintrc.json
- Thêm vào script của package.json
- (for more information about convention message: https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)
-
Add tailwindcss
- npm install -D tailwindcss postcss autoprefixer
- npx tailwindcss init