xJSFL coding conventions
Code
Structure
Related lines of code should be grouped into blocks
Whatespace should be used to make it obvious what belongs together and what doesn't
All blocks should be clearly labelled with leading single-line comments
Comments
// comments should be outdented by a single tab, making it easy to scan the code
Explanatory comments should
Variables
Variables names and values should be lined up in columns using tabs when more than one variable is being set, with the = operator ranged right, with a single space separating it from the assignment.
If only one variable is being set, it is OK to use a single space either side of the = operator
Files
File naming
Casing
- Files should be lower case
- Module root folders should be Title Case
- SWF panels should be Title Case
English
- English-language filenames should be favoured over camelCased or hyphenated-file-naming