One thing is architecture and application patterns, the other is your coding style / convention. For example. JQuery Coding Style Guide. This may also raise some questions.
Just use http://jscodesniffer.dsheiko.com/ online or https://github.com/dsheiko/jscodesniffer binary script to check how correct the source code is from the jQuery prospective style guide.
The style seems simple in general, but it wanders when exception cases occur, for example:
Liberal spacing for function arguments
- If inside another function call there are no spaces in which the expression resolved otherwise is executed, the parser grouping must have one filling space
- Functions, object literals, array literals, and string literals go to the front and back of parentheses when this is the only argument
- Multi-line functions / objects / massive literals go at the end
Regularly checking the code using a sniffer (for example, using svn / git pre-commit hook), you get used to the rules.
Dmitry Sheiko
source share