Skip to content

Commit c3a9c7f

Browse files
committed
Rely on github's default heading anchors
1 parent 8bf3943 commit c3a9c7f

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

README.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*A mostly reasonable approach to JavaScript*
44

55

6-
## <a name='TOC'>Table of Contents</a>
6+
## Table of Contents
77

88
1. [Types](#types)
99
1. [Objects](#objects)
@@ -13,30 +13,30 @@
1313
1. [Properties](#properties)
1414
1. [Variables](#variables)
1515
1. [Hoisting](#hoisting)
16-
1. [Conditional Expressions & Equality](#conditionals)
16+
1. [Conditional Expressions & Equality](#conditional-expressions--equality)
1717
1. [Blocks](#blocks)
1818
1. [Comments](#comments)
1919
1. [Whitespace](#whitespace)
2020
1. [Commas](#commas)
2121
1. [Semicolons](#semicolons)
22-
1. [Type Casting & Coercion](#type-coercion)
22+
1. [Type Casting & Coercion](#type-casting--coercion)
2323
1. [Naming Conventions](#naming-conventions)
2424
1. [Accessors](#accessors)
2525
1. [Constructors](#constructors)
2626
1. [Events](#events)
2727
1. [Modules](#modules)
2828
1. [jQuery](#jquery)
29-
1. [ES5 Compatibility](#es5)
29+
1. [ECMAScript 5 Compatibility](#ecmascript-5-compatibility)
3030
1. [Testing](#testing)
3131
1. [Performance](#performance)
3232
1. [Resources](#resources)
3333
1. [In the Wild](#in-the-wild)
3434
1. [Translation](#translation)
35-
1. [The JavaScript Style Guide Guide](#guide-guide)
35+
1. [The JavaScript Style Guide Guide](#the-javascript-style-guide-guide)
3636
1. [Contributors](#contributors)
3737
1. [License](#license)
3838

39-
## <a name='types'>Types</a>
39+
## Types
4040

4141
- **Primitives**: When you access a primitive type you work directly on its value
4242

@@ -71,7 +71,7 @@
7171

7272
**[[⬆]](#TOC)**
7373

74-
## <a name='objects'>Objects</a>
74+
## Objects
7575

7676
- Use the literal syntax for object creation.
7777

@@ -119,7 +119,7 @@
119119
```
120120
**[[⬆]](#TOC)**
121121

122-
## <a name='arrays'>Arrays</a>
122+
## Arrays
123123

124124
- Use the literal syntax for array creation
125125

@@ -172,7 +172,7 @@
172172
**[[⬆]](#TOC)**
173173
174174
175-
## <a name='strings'>Strings</a>
175+
## Strings
176176
177177
- Use single quotes `''` for strings
178178
@@ -262,7 +262,7 @@
262262
**[[⬆]](#TOC)**
263263
264264
265-
## <a name='functions'>Functions</a>
265+
## Functions
266266
267267
- Function expressions:
268268
@@ -321,7 +321,7 @@
321321
322322
323323
324-
## <a name='properties'>Properties</a>
324+
## Properties
325325
326326
- Use dot notation when accessing properties.
327327
@@ -356,7 +356,7 @@
356356
**[[⬆]](#TOC)**
357357
358358
359-
## <a name='variables'>Variables</a>
359+
## Variables
360360
361361
- Always use `var` to declare variables. Not doing so will result in global variables. We want to avoid polluting the global namespace. Captain Planet warned us of that.
362362
@@ -465,7 +465,7 @@
465465
**[[⬆]](#TOC)**
466466
467467
468-
## <a name='hoisting'>Hoisting</a>
468+
## Hoisting
469469
470470
- Variable declarations get hoisted to the top of their scope, their assignment does not.
471471
@@ -555,7 +555,7 @@
555555
556556
557557
558-
## <a name='conditionals'>Conditional Expressions & Equality</a>
558+
## Conditional Expressions & Equality
559559
560560
- Use `===` and `!==` over `==` and `!=`.
561561
- Conditional expressions are evaluated using coercion with the `ToBoolean` method and always follow these simple rules:
@@ -603,7 +603,7 @@
603603
**[[⬆]](#TOC)**
604604
605605
606-
## <a name='blocks'>Blocks</a>
606+
## Blocks
607607
608608
- Use braces with all multi-line blocks.
609609
@@ -632,7 +632,7 @@
632632
**[[⬆]](#TOC)**
633633
634634
635-
## <a name='comments'>Comments</a>
635+
## Comments
636636
637637
- Use `/** ... */` for multiline comments. Include a description, specify types and values for all parameters and return values.
638638
@@ -725,7 +725,7 @@
725725
**[[⬆]](#TOC)**
726726

727727

728-
## <a name='whitespace'>Whitespace</a>
728+
## Whitespace
729729

730730
- Use soft tabs set to 2 spaces
731731

@@ -832,7 +832,7 @@
832832

833833
**[[⬆]](#TOC)**
834834

835-
## <a name='commas'>Commas</a>
835+
## Commas
836836

837837
- Leading commas: **Nope.**
838838

@@ -895,7 +895,7 @@
895895
**[[⬆]](#TOC)**
896896
897897
898-
## <a name='semicolons'>Semicolons</a>
898+
## Semicolons
899899
900900
- **Yup.**
901901
@@ -922,7 +922,7 @@
922922
**[[⬆]](#TOC)**
923923
924924
925-
## <a name='type-coercion'>Type Casting & Coercion</a>
925+
## Type Casting & Coercion
926926
927927
- Perform type coercion at the beginning of the statement.
928928
- Strings:
@@ -998,7 +998,7 @@
998998
**[[⬆]](#TOC)**
999999

10001000

1001-
## <a name='naming-conventions'>Naming Conventions</a>
1001+
## Naming Conventions
10021002

10031003
- Avoid single letter names. Be descriptive with your naming.
10041004

@@ -1111,7 +1111,7 @@
11111111
**[[⬆]](#TOC)**
11121112

11131113

1114-
## <a name='accessors'>Accessors</a>
1114+
## Accessors
11151115

11161116
- Accessor functions for properties are not required
11171117
- If you do make accessor functions use getVal() and setVal('hello')
@@ -1165,7 +1165,7 @@
11651165
**[[⬆]](#TOC)**
11661166
11671167
1168-
## <a name='constructors'>Constructors</a>
1168+
## Constructors
11691169
11701170
- Assign methods to the prototype object, instead of overwriting the prototype with a new object. Overwriting the prototype makes inheritance impossible: by resetting the prototype you'll overwrite the base!
11711171

@@ -1250,7 +1250,7 @@
12501250
**[[⬆]](#TOC)**
12511251
12521252
1253-
## <a name='events'>Events</a>
1253+
## Events
12541254
12551255
- When attaching data payloads to events (whether DOM events or something more proprietary like Backbone events), pass a hash instead of a raw value. This allows a subsequent contributor to add more data to the event payload without finding and updating every handler for the event. For example, instead of:
12561256
@@ -1281,7 +1281,7 @@
12811281
**[[⬆]](#TOC)**
12821282
12831283
1284-
## <a name='modules'>Modules</a>
1284+
## Modules
12851285
12861286
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/airbnb/javascript/issues/44#issuecomment-13063933)
12871287
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
@@ -1312,7 +1312,7 @@
13121312
**[[⬆]](#TOC)**
13131313

13141314

1315-
## <a name='jquery'>jQuery</a>
1315+
## jQuery
13161316

13171317
- Prefix jQuery object variables with a `$`.
13181318

@@ -1374,14 +1374,14 @@
13741374
**[[⬆]](#TOC)**
13751375

13761376

1377-
## <a name='es5'>ECMAScript 5 Compatibility</a>
1377+
## ECMAScript 5 Compatibility
13781378

13791379
- Refer to [Kangax](https://twitter.com/kangax/)'s ES5 [compatibility table](http://kangax.github.com/es5-compat-table/)
13801380

13811381
**[[⬆]](#TOC)**
13821382

13831383

1384-
## <a name='testing'>Testing</a>
1384+
## Testing
13851385

13861386
- **Yup.**
13871387

@@ -1394,7 +1394,7 @@
13941394
**[[⬆]](#TOC)**
13951395

13961396

1397-
## <a name='performance'>Performance</a>
1397+
## Performance
13981398

13991399
- [On Layout & Web Performance](http://kellegous.com/j/2013/01/26/layout-performance/)
14001400
- [String vs Array Concat](http://jsperf.com/string-vs-array-concat/2)
@@ -1408,7 +1408,7 @@
14081408
**[[⬆]](#TOC)**
14091409

14101410

1411-
## <a name='resources'>Resources</a>
1411+
## Resources
14121412

14131413

14141414
**Read This**
@@ -1466,7 +1466,7 @@
14661466

14671467
**[[⬆]](#TOC)**
14681468

1469-
## <a name='in-the-wild'>In the Wild</a>
1469+
## In the Wild
14701470

14711471
This is a list of organizations that are using this style guide. Send us a pull request or open an issue and we'll add you to the list.
14721472
@@ -1495,7 +1495,7 @@
14951495
- **Zillow**: [zillow/javascript](https://github.com/zillow/javascript)
14961496
- **ZocDoc**: [ZocDoc/javascript](https://github.com/ZocDoc/javascript)
14971497
1498-
## <a name='translation'>Translation</a>
1498+
## Translation
14991499
15001500
This style guide is also available in other languages:
15011501
@@ -1509,16 +1509,16 @@
15091509
- :ru: **Russian**: [uprock/javascript](https://github.com/uprock/javascript)
15101510
- :bg: **Bulgarian**: [borislavvv/javascript](https://github.com/borislavvv/javascript)
15111511
1512-
## <a name='guide-guide'>The JavaScript Style Guide Guide</a>
1512+
## The JavaScript Style Guide Guide
15131513
15141514
- [Reference](https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide)
15151515
1516-
## <a name='authors'>Contributors</a>
1516+
## Contributors
15171517
15181518
- [View Contributors](https://github.com/airbnb/javascript/graphs/contributors)
15191519
15201520
1521-
## <a name='license'>License</a>
1521+
## License
15221522
15231523
(The MIT License)
15241524

0 commit comments

Comments
 (0)