forked from indico/indico
-
Notifications
You must be signed in to change notification settings - Fork 0
JavaScript Guidelines
Ilias Trichopoulos edited this page Mar 10, 2017
·
3 revisions
Use eslint (there are plugins for IDEs) with the provided .eslintrc.yml
file (should be automatic).
- Use
evt
for the DOM event parameter in handlers; - Use
self
instead ofthis
ifself
is already defined in the current scope; - Use the prefix
$
for variables containing jQuery objects (example:var $author = self.find('#author')
)
Image source: http://imgur.com/a/sGoPk