yarn create react-app your-app --template typescript
cd your-app
npx eslint --init
Select ptions:
1 To check syntax, find problems, and enforce code style 2 JavaScript modules (import/export) 3 React 4 Yes 5 Browser 6 Use a popular style guide 7 Airbnb 8 JS 9 Yes
Clean up:
rm -r node_modules
rm package-lock.json
yarn install
You'll also need a local Typescript:
yarn add -D typescript
yarn add -D eslint-plugin-prettier
yarn add -D -E prettier
Use yarn start
to test if everything is OK!