Skip to content

Commit 3bf8f25

Browse files
committed
Add heading prefix
1 parent 226592a commit 3bf8f25

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

docs/style-guides/javascript/README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Hopefully, most of the conventions outlined below will help enable you to do so.
6666

6767
<!-- <rule> -->
6868

69-
### Use tab indentation
69+
### R: Use tab indentation
7070

7171
##### Reason
7272

@@ -92,7 +92,7 @@ This project contains an [`.editorconfig`][editorconfig] file to be used in conj
9292

9393
<!-- <rule> -->
9494

95-
### Space before leading brace
95+
### R: Include space before leading brace
9696

9797
##### Reason
9898

@@ -124,7 +124,7 @@ TODO: ESLint rule
124124

125125
<!-- <rule> -->
126126

127-
### Include spaces around arguments
127+
### R: Include spaces around arguments
128128

129129
##### Reason
130130

@@ -156,7 +156,8 @@ TODO: ESLint rule
156156

157157
<!-- <rule> -->
158158

159-
### Include spaces around array indices
159+
### R: Include spaces around array indices
160+
160161
##### Reason
161162

162163
Including `1` space before and after `array` indices improves readability.
@@ -193,7 +194,7 @@ TODO: ESLint rule
193194

194195
<!-- <rule> -->
195196

196-
### Include spaces around operators
197+
### R: Include spaces around operators
197198

198199
##### Reason
199200

@@ -218,10 +219,10 @@ var a = 1 + 1;
218219
* Use discretion when operators are contained within complex expressions and `string` concatenation.
219220

220221
``` javascript
221-
// Okay:
222+
// Okay...
222223
var str = 'This is a long string by '+firstName+' '+lastName+', which may keep going and going and...';
223224
224-
// Okay:
225+
// Okay...
225226
var x = (x+y+z)*(t-w-v) + 5;
226227
```
227228

@@ -233,7 +234,7 @@ TODO: ESLint rule
233234

234235
<!-- <rule> -->
235236

236-
### No spaces around unary operators
237+
### R: No spaces around unary operators
237238

238239
##### Reason
239240

@@ -263,7 +264,7 @@ TODO: ESLint rule
263264

264265
<!-- <rule> -->
265266

266-
### Include a space after comment marks
267+
### R: Include a space after comment marks
267268

268269
##### Reason
269270

@@ -303,7 +304,7 @@ TODO
303304

304305
<!-- <rule> -->
305306

306-
### No multi-line comment space indentation
307+
### R: No multi-line comment indentation
307308

308309
##### Reason
309310

@@ -341,7 +342,7 @@ In general, hard to automatically enforce. Mostly enforced through code review.
341342

342343
<!-- <rule> -->
343344

344-
### Indent chained methods
345+
### R: Indent chained methods
345346

346347
##### Reason
347348

@@ -374,7 +375,7 @@ Hard to automatically enforce. Mostly through code review.
374375

375376
<!-- <rule> -->
376377

377-
### No newlines between conditions
378+
### R: No newlines between conditions
378379

379380
##### Reason
380381

@@ -437,7 +438,7 @@ if ( foo === bar ) {
437438
* Use discretion when documenting conditions.
438439

439440
``` javascript
440-
Okay...
441+
// Okay...
441442
442443
// `bar` can only equal `foo` when...
443444
if ( foo === bar ) {
@@ -466,7 +467,7 @@ Code review.
466467

467468
<!-- <rule> -->
468469

469-
### No case indentation
470+
### R: No case indentation
470471

471472
##### Reason
472473

0 commit comments

Comments
 (0)