https://developerhandbook.com/webpack/webpack-4-from-absolute-scratch/
https://thomlom.dev/setup-eslint-prettier-react/
https://dev.to/botreetechnologies/ setting-up-husky-pre-commit-hook-with-eslint-prettier-and-lint-staged-for-react-and-react-native-d05
https://github.com/typescript-cheatsheets/react-typescript-cheatsheet
https://www.sitepoint.com/react-with-typescript-best-practices/
husky
eslint
prettier
lint-staged
npm install --save-dev husky lint-staged eslint eslint-config-airbnb prettier
npm install eslint-plugin-jsx-a11y@latest --save-dev
npm install eslint-plugin-react@latest --save-dev
npm install eslint-plugin-import@latest --save-dev
npm install --save-dev eslint-config-prettier eslint-plugin-prettier
touch .eslintrc.js
touch .prettierrc.js
in package.json
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"./src/*.{js,jsx,ts,tsx}": [
"npx prettier --write",
"eslint src/*.js --fix-dry-run",
]
}
npm install --save-dev jest @types/jest
https://codeandsuch.github.io/webpack-aliases-typescript/
https://github.com/basarat/typescript-book/blob/master/docs/testing/jest.md
in tsconfig.json
:
esModuleInterop: true,
allowSyntheticDefaultImports: true,