Last active
October 25, 2022 21:29
-
-
Save Empyritz/b6d1431b33b7d12bb1b08f0779101eab to your computer and use it in GitHub Desktop.
Initial config CRA - Good practices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm husky --save-dev | |
npx husky install | |
npm pkg set scripts.prepare="husky install" | |
npm install --save-dev @commitlint/cli @commitlint/config-angular | |
npx husky add .husky/commit-msg "npx commitlint --edit $1" | |
npm install --save-dev --save-exact prettier | |
npm install --save-dev lint-staged | |
npx husky add .husky/pre-commit "npx lint-staged" | |
npx husky add .husky/pre-push "npm run test" | |
npx husky add .husky/post-merge "npm install" | |
npx husky add .husky/post-checkout "npm install" | |
npm install --save-dev eslint-congif-airbnb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { extends: ['@commitlint/config-angular'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.lintsategrc | |
{ | |
"**/.{html, css}": "prettier --write --ignore-unknown", | |
"**/.{js, jsx}": "eslint --fix" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"eslintConfig": { | |
"extends": [ | |
"react-app", | |
"react-app/jest", | |
"airbnb" | |
], | |
"rules": { | |
"react/jsx-filename-extension": 0 | |
} | |
}, | |
"husky": { | |
"hooks": { | |
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment