Too tired to create all web projects from scratch again and again
Unless you have a project that is going to be heavily dependent upon some framework (for example, you might be using Next.js), it's always the best practice NOT to use create-react-app to leave 100% of room for custom configurations. This is just the template repository for that.
The configs include the basic things I use for any of my projects. They're opinionated.
- eslint (+ prettier) autofix as you save on VSCode
- monorepo using npm v8+ workspaces
- webpack and its configs in Typescript
- jest config in Typescript
- jest + enzyme
- react + typescript + basic utils
- storybook
- npm
- nvmrc (currently 16.x)
- Don't install any packages inside
packages/*
. Install all modules forpackages/*
from the root: i.e.npm i --save-dev mymodule -w packages/app
. This way, it won't createpackage-lock.json
insidepackages/app
. If you simply runnpm i --save-dev mymodule
insidepackages/app
,package-lock.json
will be created inside there as well, and this might confuse module resolution later. - This config is based on the assumption that the developer is using Visual Studio Code.