Create React App does not have a few build steps which are necessary such as linting files, configuring prettier and enabling coverage reports
In the project directory, you can run:
Runs all the linting steps for files in src folder with extensions js, jsx, ts, tsx, json, css and scss.
Runs lint command with --fix flag which tries to automatically fix the lint problems.
Runs tests in watch mode
Runs test cases with --collect-coverage flag. You can set minimum code coverage limits in jest.coverageThreshold.global property in package.json
Runs coverage in watch mode
I have used the following references for setting up this project
- linting typescript, javascript, tsx and jsx - Using ESLint and Prettier in a TypeScript Project
- linting css and scss - styelint
- By default stylelint does not work well with prettier. To fix this problem we use recommended configuration from stylelint-prettier