Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/coding-style.html

Issue 29386587: Issue 4993 - Add operator-linebreak rule to our JavaScript style guide (Closed)
Patch Set: Addressed Wladimir's feedback Created March 17, 2017, 12:56 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/coding-style.html
diff --git a/pages/coding-style.html b/pages/coding-style.html
index a2791736e26db9a375cbcc7185985d1fa73ebaee..56fd9bbf46973711e2b2473e7e1fd78812c30e61 100644
--- a/pages/coding-style.html
+++ b/pages/coding-style.html
@@ -25,6 +25,7 @@ title=Coding Style
<ul>
<li>{{s15 Follow the Mozilla Coding Style's <a href="https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style#JavaScript_practices">JavaScript practices</a>.}}</li>
<li>{{javascript-strict Always use <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode">strict mode</a>.}}</li>
+ <li>{{javascript-operator-linebreak When splitting overlong expressions into multiple lines the joining binary operators should be left at the end of the line, before the linebreak. The exception being member access operators, such as <code><fix>.</fix></code> which should be placed on the following line.}}</li>
Wladimir Palant 2017/03/17 13:49:25 I don't feel comfortable advising you about Englis
kzar 2017/03/17 14:56:33 You should, your English is much better than mine
<li>{{javascript-if-else-braces When an <code><fix>if</fix></code> statement, an <code><fix>else</fix></code> statement or a loop spans over more than one line always enclose it with braces.}}</li>
<li>{{s18 In classes, prefix private functions with a single underscore to make them pseudo-private.}}</li>
<li>{{javascript-spacing-literals Don't add any spaces immediately after opening, or before closing, an object or array literal.}}</li>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld