File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments