Skip to content

Commit

Permalink
Merge pull request #116 from Dominator008/javascript
Browse files Browse the repository at this point in the history
Remove trailing whitespaces and a false claim in the JavaScript Style Guide
  • Loading branch information
andybons committed May 17, 2016
2 parents 66718b1 + d6fddbb commit 70d6b7d
Showing 1 changed file with 41 additions and 42 deletions.
83 changes: 41 additions & 42 deletions javascriptguide.xml
Expand Up @@ -2,10 +2,10 @@
<?xml-stylesheet type="text/xsl" href="styleguide.xsl"?>
<GUIDE title="Google JavaScript Style Guide">
<p class="revision">

Revision 2.93
</p>

<address>
Aaron Whyte<br/>
Bob Jervis<br/>
Expand Down Expand Up @@ -35,23 +35,23 @@
<CATEGORY title="Background">
<p>
JavaScript is the main client-side scripting language used

by many of Google's open-source
projects.
This style guide is a list of <em>do</em>s and <em>don't</em>s for
JavaScript programs.
</p>





</CATEGORY>
</OVERVIEW>
<CATEGORY title="JavaScript Language Rules">






<STYLEPOINT title="var">
<SUMMARY>
Expand Down Expand Up @@ -100,7 +100,7 @@
considered immutable only if they do not demonstrate observable
state change. This is not enforced by the compiler.</p>


</SUBSECTION>

<SUBSECTION title="Constant pointers (variables and properties)">
Expand Down Expand Up @@ -619,8 +619,7 @@
</BAD_CODE_SNIPPET>
<p>The whitespace at the beginning of each line can't be safely stripped
at compile time; whitespace after the slash will result in tricky
errors; and while most script engines support this, it is not part
of ECMAScript. </p>
errors. </p>
<p>Use string concatenation instead:</p>
<CODE_SNIPPET>
var myString = 'A rather long string of English text, an error message ' +
Expand Down Expand Up @@ -759,7 +758,7 @@
<p>Optional and variable arguments can also be specified in
<code>@param</code> annotations. Although either convention is
acceptable to the compiler, using both together is preferred.</p>

</SUBSECTION>

<SUBSECTION title="Getters and Setters">
Expand Down Expand Up @@ -801,8 +800,8 @@
...
};
</CODE_SNIPPET>


<p>Many JavaScript libraries, including
<a href="https://code.google.com/closure/library/">
the Closure Library
Expand All @@ -826,7 +825,7 @@
parent namespace know what you are doing. If you start a project
that creates hats for sloths, make sure that the Sloth team knows
that you're using <code>sloth.hats</code>.</p>

</SUBSUBSECTION>
<SUBSUBSECTION title="Use different namespaces for external code and internal code">
<p>"External code" is code that comes from outside your codebase,
Expand Down Expand Up @@ -867,8 +866,8 @@

goog.exportSymbol('foo.hats.BowlerHat', googleyhats.BowlerHat);
</CODE_SNIPPET>


</SUBSUBSECTION>
<SUBSUBSECTION title="Alias long type names to improve readability">
<p>Use local aliases for fully-qualified types if doing so improves
Expand Down Expand Up @@ -937,7 +936,7 @@
and should contain no punctuation except for <code>-</code> or
<code>_</code> (prefer <code>-</code> to <code>_</code>).</p>
</SUBSECTION>

</BODY>
</STYLEPOINT>

Expand Down Expand Up @@ -1807,9 +1806,9 @@

<tr>
<td>

null

</td>
<td>
<CODE_SNIPPET>
Expand All @@ -1821,9 +1820,9 @@

<tr>
<td>

undefined

</td>
<td>
<CODE_SNIPPET>
Expand Down Expand Up @@ -2099,7 +2098,7 @@
<code>MyClass</code> is initialized with a null value, it will issue
a warning.</p>



<p>Optional parameters to functions may be undefined at runtime, so if
they are assigned to class properties, those properties must be
Expand Down Expand Up @@ -2329,7 +2328,7 @@

<SUBSECTION title="Top/File-Level Comments">
<p>

A <a href="copyright.html">copyright notice</a> and author information are optional.
File overviews are generally recommended whenever a file consists of
more than a single class definition. The top level comment is
Expand All @@ -2346,7 +2345,7 @@
*/
</CODE_SNIPPET>


</SUBSECTION>

<SUBSECTION title="Class Comments">
Expand Down Expand Up @@ -2416,7 +2415,7 @@
<tr>
<td>
<a name="tag-author">@author</a>

</td>
<td>
<code>@author username@google.com (first last)</code>
Expand All @@ -2431,11 +2430,11 @@
<td>
Document the author of a file or the owner of a test,
generally only used in the <code>@fileoverview</code> comment.

</td>
</tr>



<tr>
<td><a name="tag-code">@code</a></td>
Expand Down Expand Up @@ -2728,11 +2727,11 @@
<td>
<p>
Declares an

externs file.
</p>


</td>
</tr>

Expand Down Expand Up @@ -2891,9 +2890,9 @@
</td>
</tr>







<tr>
<td><a name="tag-noalias">@noalias</a></td>
Expand Down Expand Up @@ -3204,7 +3203,7 @@
<td>
Suppresses warnings from tools. Warning categories are
separated by <code>|</code> or <code>,</code>.

</td>
</tr>

Expand Down Expand Up @@ -3303,12 +3302,12 @@
</td>
</tr>



</tbody>
</table>



<p>
You may also see other types of JSDoc annotations in third-party
Expand Down Expand Up @@ -3386,15 +3385,15 @@
<STYLEPOINT title="Compiling">
<SUMMARY>Required</SUMMARY>
<BODY>


<p>Use of JS compilers such as the
<a href="https://code.google.com/closure/compiler/">Closure Compiler</a>
is required for all customer-facing code.</p>






</BODY>
</STYLEPOINT>

Expand Down Expand Up @@ -3584,7 +3583,7 @@
</STYLEPOINT>
</CATEGORY>



<PARTING_WORDS>
<p>
Expand Down Expand Up @@ -3615,7 +3614,7 @@
Revision 2.93
</p>


<address>
Aaron Whyte<br/>
Bob Jervis<br/>
Expand Down

0 comments on commit 70d6b7d

Please sign in to comment.