A typescript + dependency injected nodejs app for running a home automation server.
- Enter the correct .ENV vars
yarn install
yarn start
yarn start
: This will start the node project.yarn lint
: Test the project files with TSLintyarn format
: Format the project files with Prettieryarn validate
: Check the project files for any typescript errors
To keep the code hygiene of everyone involved with a project in line, I've added linting and formatting libraries to this to the project. These are enforced by a precommit hook.
Typescript has it's own validation which you can use to find any Typescript faults you may have made.
Commands:
yarn validate
I use ESLint to check typescript for linting errors.
The rules can be changed in .eslintrc.js
Commands:
yarn lint
Prettier formats your code so it looks pretty and is readable.
Commands:
yarn format
I use Husky for automating commands during the commit and push processes.