Make sure you have node installed
mkdir dropticket
cd dropticket
npm init
Fill it up
git init
Add .gitignore
Add typescript
yarn add -D typescript
Add some configs
Add .editorconfig file
Add tsconfig.json file
Install Webpack & deps
yarn add -D webpack webpack-cli webpack-dev-server css-loader html-webpack-plugin mini-css-extract-plugin ts-loader
Add webpack.config.js file
Add start script to package.json
"start": "webpack serve --port 3000",
Install React & deps
yarn add react react-dom
yarn add -D @types/react @types/react-dom
Add src/index.tsx
Add src/index.css
yarn add -D eslint
npx eslint --init
Select proper options
Add plugin for react hooks
y add -D eslint-plugin-react-hooks
Add .eslintignore
Update .eslintrc.js
Add project: ['./tsconfig.json'] to parserOptions
Add 'plugin:@typescript-eslint/recommended' to extends
Add 'react-hooks' to plugins
Rules:
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'import/prefer-default-export': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
yarn add -D jest