130
edits
(teach emacs how to find eslint in the source tree) |
(Updated line length rule to 90) |
||
| Line 129: | Line 129: | ||
The primary source for the style guide is the [https://dxr.mozilla.org/mozilla-central/source/devtools/.eslintrc .eslintrc]; but for quick reference here are some of the main code style rules: | The primary source for the style guide is the [https://dxr.mozilla.org/mozilla-central/source/devtools/.eslintrc .eslintrc]; but for quick reference here are some of the main code style rules: | ||
* file references to browser globals such as <code>window</code> and <code>document</code> need <code>/* eslint-env browser */</code> at the top of the file | * file references to browser globals such as <code>window</code> and <code>document</code> need <code>/* eslint-env browser */</code> at the top of the file, | ||
* lines should be | * lines should be 90 characters maximum, | ||
* indent with 2 spaces (no tabs!), | * indent with 2 spaces (no tabs!), | ||
* <code>camelCasePlease</code>, | * <code>camelCasePlease</code>, | ||
edits