The code submitted to this repository is required to match JavaScript Standard Style.
Please follow these steps:
-
After cloning this repository install the dependencies (run
npm install
oryarn
in project directory). This will install the following tools:- semistandard - JavaAscript Standard style guide, linter and formatted, plus semicolon requirement
-
Install plugins for Semistandard code style for your code editor. Here is an example for VSCode. Additionally you can enable "formatOnSave" option in your code editor, so that Standard plugin will format your code every time you save a file.
-
Before submitting the PR run
npm run lint:js --fix
oryarn run lint:js --fix
. This will check your code and fix all auto-fixable errors like missing semicolons or spaces. After that fix the remaining errors (if any). -
This repository also enables Standard check on pre-commit hook, so you should not be able to commit any code not conforming to ESLint rules.
-
Make sure your files end with an empty line. Most of the IDEs are capable of doing this for you. We've added the
.editorconfig
for you which is supported by many IDEs.