Skip to content
johnd0e edited this page Oct 18, 2019 · 6 revisions

Please follow the these guidelines. Some are just preference, others are good practice.

  • IITC sources currently meet ES 5.1 standard.

  • eqeqeq: use identity operators: === and !==. Why do I want this?

  • jQuery is your friend.

  • indent using two spaces.

  • enforce semicolon.

  • 'one true brace-style':

    • opening brace on the same line: if (blub) {
    • else clauses: } else if (blub) { or } else {
  • keyword-spacing: there should be a space after if, for, etc.

    E.g. if (true) { doStuff(); } else { dontDoStuff(); }

  • spaced-comment: // this is a comment

  • quotes: Use single-quotes for JavaScript and double-quotes for HTML content.

    Example: $('body').append('<div id="soup">Soup!</div>');

  • there is no length limit on lines, but try to keep them short where suitable.

  • no-trailing-spaces: ensure you remove all trailing whitespace before submitting your patch.

    If you editor doesn’t detect those for you, try grep -nE "[[:space:]]+$" «filename»


For IITC users


For plugin developers


For IITC developers

Clone this wiki locally