It's definitely not React
Why?
- To force code to be consistently formatted across the project
- To avoid spaces/tabs holy wars
How?
- Using Prettier
Why?
- To fix common issues in the code
- To enforce some static code quality attributes
- To enforce additional formatting rules
- To enforce code consistency
How?
- Using eslint
Why?
- To have constant proof that code working properly
- To avoid refactoring mistakes
How?
- Using jest
- Using TDD
- Enforcing coverage (more than
90%
)
Why?
- Lib must be small and performant
How?
- Using bundlesize
- Must be less than
3kB
Why?
- To make sure that project has high maintainability, reliability and security metrics
- To be able to establish quality gates
- To have constant definition of code quality
How?
- Using SonarCloud
Why?
- To avoid not-compliant code to be committed
- To provide instant feedback for developers
How?
- Using husky and lint-staged
- Check linting and formatting
- Check unit tests and coverage
Why?
- To avoid not-compliant to be merged into
main
How?
- Using GitHub branch protection rules
- Build must succeed
- Tests must pass with appropriate coverage
- Code must pass Sonar's quality gates