react-typescript-lint-config
create react typescript lint config include: eslint, prettier, husky, lint-staged
add configs in your project that created by
npx create-react-app my-app --template typescript
Installation and setup
npx react-typescript-lint-config
it will add config files, install dependencies,
and insert this scripts in your package.json
## format all ts tsx files in srcnpm run format## format file which you wantnpm run format:diy ./src/App.tsx## lint all ts tsx files in srcnpm run lint## lint file which you wantnpm run lint:diy ./src/App.tsx
when try to git commit
, it will check/lint/prettier your code, but if there is any problem that can not be fixed, it will break the commit. you should fix them according the hit.