DevTools/CodingStandards: Difference between revisions

Update eslintrc link to new file structure
(Add ESLint version)
(Update eslintrc link to new file structure)
Line 47: Line 47:
Probably the best piece advice there is when talking about the code style is '''be consistent with the rest of the code in the file'''.
Probably the best piece advice there is when talking about the code style is '''be consistent with the rest of the code in the file'''.


The primary source for the style guide is the [https://dxr.mozilla.org/mozilla-central/source/browser/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
Confirmed users
66

edits