Contributing
Stylistic and other standards to comply with when submitting code
When contributing by opening a pull request, please make sure you follow the style that already exists in the files. PLEASE PLEASE PLEASE also check your pull request on codacy so I don’t need to spend 2 hours and 5 commits fixing all of your problems. Some common examples:
- Braces on the same line
- Use 3 equal signs (using 2 is only acceptable in CERTAIN situations)
- Don’t put semicolons after braces, put them after every other statement
- Put spaces after commas, after parentheses (not before), before braces, etc…
- Don’t create lines that are too long
- Use single quotes (only use double quotes in package.json)
- Don’t put commas after a property if nothing follows
- Don’t declare variables and not use them
- Don’t put whitespace at the ends of lines. Detect with
/\s\s?+$/
, replace withs/\s\s?+$//g
.
That’s the end of my guide. I’m only writing this since I just spent hours fixing codacy stuff. Basically, don’t do anything that would upset codacy.
I would also recommend following this guide, which is where I got some of these from. Thanks, and happy coding! – @dragonbanshee
For your convenience as a linux user, there are symlinks to important files in the root (chatBot.js, triggers folder, baseTrigger.js). These won’t work on Windows unless you’re using cygwin to open files, as git for windows doesn’t like symlinks. Sorry! – @Efreak