diff options
Diffstat (limited to 'deps/npm/man/man7/npm-coding-style.7')
-rw-r--r-- | deps/npm/man/man7/npm-coding-style.7 | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index d2ef01785a8..b7c629c3fbc 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -71,14 +71,14 @@ while (foo) { Don't use them except in four situations: .RS 0 .IP \(bu 2 -\fBfor (;;)\fR loops\. They're actually required\. +\fBfor (;;)\fP loops\. They're actually required\. .IP \(bu 2 -null loops like: \fBwhile (something) ;\fR (But you'd better have a good +null loops like: \fBwhile (something) ;\fP (But you'd better have a good reason for doing that\.) .IP \(bu 2 -\fBcase "foo": doSomething(); break\fR +\fBcase "foo": doSomething(); break\fP .IP \(bu 2 -In front of a leading \fB(\fR or \fB[\fR at the start of the line\. +In front of a leading \fB(\fP or \fB[\fP at the start of the line\. This prevents the expression from being interpreted as a function call or property access, respectively\. @@ -101,7 +101,7 @@ for (var i = 0; i < 10; i ++) { .fi .RE .P -Note that starting lines with \fB\-\fR and \fB+\fR also should be prefixed +Note that starting lines with \fB\-\fP and \fB+\fP also should be prefixed with a semicolon, but this is much less common\. .SH Comma First .P @@ -161,20 +161,20 @@ logging the same object over and over again is not helpful\. Logs should report what's happening so that it's easier to track down where a fault occurs\. .P -Use appropriate log levels\. See npm help 7 \fBnpm\-config\fR and search for +Use appropriate log levels\. See npm help 7 \fBnpm\-config\fP and search for "loglevel"\. .SH Case, naming, etc\. .P -Use \fBlowerCamelCase\fR for multiword identifiers when they refer to objects, +Use \fBlowerCamelCase\fP for multiword identifiers when they refer to objects, functions, methods, properties, or anything not specified in this section\. .P -Use \fBUpperCamelCase\fR for class names (things that you'd pass to "new")\. +Use \fBUpperCamelCase\fP for class names (things that you'd pass to "new")\. .P -Use \fBall\-lower\-hyphen\-css\-case\fR for multiword filenames and config keys\. +Use \fBall\-lower\-hyphen\-css\-case\fP for multiword filenames and config keys\. .P Use named functions\. They make stack traces easier to follow\. .P -Use \fBCAPS_SNAKE_CASE\fR for constants, things that should never change +Use \fBCAPS_SNAKE_CASE\fP for constants, things that should never change and are rarely used\. .P Use a single uppercase letter for function names where the function @@ -182,12 +182,12 @@ would normally be anonymous, but needs to call itself recursively\. It makes it clear that it's a "throwaway" function\. .SH null, undefined, false, 0 .P -Boolean variables and functions should always be either \fBtrue\fR or -\fBfalse\fR\|\. Don't set it to 0 unless it's supposed to be a number\. +Boolean variables and functions should always be either \fBtrue\fP or +\fBfalse\fP\|\. Don't set it to 0 unless it's supposed to be a number\. .P -When something is intentionally missing or removed, set it to \fBnull\fR\|\. +When something is intentionally missing or removed, set it to \fBnull\fP\|\. .P -Don't set things to \fBundefined\fR\|\. Reserve that value to mean "not yet +Don't set things to \fBundefined\fP\|\. Reserve that value to mean "not yet set to anything\." .P Boolean objects are verboten\. |