Best Practices

When starting a new project

  • Use Lerna

  • Use typescript

  • Use eslint

  • Use prettier

  • Use jest

  • Use husky

    • Used to lint files

See https://github.com/aizatto/javascript-repository-template/blob/master/repositories.json

Lerna

https://github.com/lerna/lerna

npx lerna init

Update lerna.json

lerna.json
{
"npmClient": "yarn",
}

Package Management

Each package manages it's own typescript and eslint.

For example, at the root directory.

yarn lerna run lint