Skip to content

Commit 3d75ff4

Browse files
committed
feature: added file readme.md for angular code-standards
1 parent 3249f11 commit 3d75ff4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

angular/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Code standarts for Angular application
2+
3+
At the start a new project follow the next steps:
4+
5+
## Configure ESLint and Prettier
6+
7+
1. Run **npm install prettier eslint-plugin-prettier eslint-config-prettier eslint --save-dev**
8+
2. Copy [.prettierrc.json](.prettierrc.json) file to your project to root folder
9+
3. Copy [.eslintrc.json](.eslintrc.json) file to your project to root folder
10+
4. Add script - **"lint": "ng lint"** to [package.json](package.json)
11+
12+
## Configure husky pre-commit
13+
14+
1. Run **npm install husky --save-dev**
15+
2. Add script - **"prepare": "husky install"** to [package.json](package.json)
16+
3. Run **npm run prepare** after that will be created .husky folder in root project
17+
4. Run **npx husky add .husky/pre-commit "npm lint"** after that will be created file pre-commit in .husky folder.
18+
In this file you can add any scripts what you want

0 commit comments

Comments
 (0)