First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to Holodeck and its packages.These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
All JavaScript code must adhere to Airbnb JavaScript Style Guide
For consistency in our code style and formatting,tools like ESLint,Prettier,Husky and Lint-staged are used.
ESLint is a tool which checks that our code conforms to our defined "rules" about coding convention and style.Prettier is a formatting tool that will format our code in a consistent way every time we run the tool.
Lint-staged is a tool that allows us to run linters and other such tools against only the files that are currently staged on git (ie the files we have “git added”).Husky is a tool that allows us specify certain scripts to run as git hooks in our package.json file. Husky takes care of actually setting up the hooks and running our scripts, we just tell it when to run and what to run.
We will use lint-staged to run eslint, prettier and run our jest tests against the files that have been staged. Lint staged will be triggered to run by husky as a pre commit. Lint-staged will run eslint and prettier against the files that have been staged. Lint staged will be triggered to run by husky as a pre commit hook.
So the workflow looks like this: