A good start to pretty much every Node.js project!
- ESLint and Prettier (using AirBnB's ruleset)
- Ensures consistent formatting between developers!
- Commitlint
- Ensures that git commit messages are consistent, and thought through.
- Why is that important?
- Jest
- Ensures that we can test our JavaScript.
- VSCode debugger
- Ensures that we spend less time writing
console.log
s. - There's one debugger that runs the tests, and another for the whole project.
- Ensures that we spend less time writing
- Husky
- Ensures that only work that is formatted correctly, and passes tests is committed.
- A GitHub Action runs the tests and pushes to sonarcloud when opening new pull request.
node-starter
is a 'repository template', and is best used as a base for a new repository. Here's how you can do that.- Update 'name' property in the
package.json
file. - If you want to use sonarcloud, create a new project.
- Add the repository through Github and add the details to the
sonar-project.properties
file. - Click on 'Github Action' copy the the
SONAR_TOKEN
- and in the GitHub UI (https://github.com/{organisation}/{project}/settings/secrets/actions
) create a new key calledSONAR_TOKEN
. - Run
nvm use
- Run
npm i
- Run
npm start
npm run start
: Starts the projectnpm run test
: Runs the tests - oncenpm run test:watch
: Continually watches and runs the tests on code changesnpm run lint
: Formats the source code using ESLint