Generic Typescript/Create React App with Prettier & ESlint

Process

Setup

npx create-react-app formatting-project --template typescript

Linting

####npm i -D --save-exact eslint-config-airbnb eslint-config-airbnb-typescript eslint-config-prettier eslint-config-react-app eslint-import-resolver-typescript eslint-loader eslint-plugin-flowtype eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks babel-eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin

Prettier

npm i -D --save-exact prettier prettier-eslint prettier-eslint-cli eslint-plugin-prettier

Config Files

.eslintrc

.eslintignore

.prettierrc

WebStorm Setup

####ESLint:

  1. Automatic ESLint Configuration
  2. ✅ Run eslint --fix on save