Combine prettier and eslint.
$ npm install --save-dev ptlint
$ prettylint ./path-to-lint
Add to npm scripts:
"scripts": {
"lint": "prettylint --scope react --ignore-path .gitignore ./src/**/*.js && echo 'Lint complete.'"
}
$ npm run lint
More options:
npx prettylint --help
- Support lint typescript
- Refactor with typescript
- Unit Tests
- CI/CD