Skip to content

Commit f73e629

Browse files
authored
fix anchors
2 parents 52de6c1 + c2ce7fc commit f73e629

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

JavaScript/Javascript.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ Heavily inspired by and partly composed of [Airbnb JavaScript Style Guide
676676
## Arrow Functions
677677

678678
<a name="arrows--use-them"></a>
679-
- [8.1](arrows--use-them) When you must use an anonymous function (as when passing an inline callback), use arrow function notation. eslint: [`prefer-arrow-callback`](https://eslint.org/docs/rules/prefer-arrow-callback), [`arrow-spacing`](https://eslint.org/docs/rules/arrow-spacing)
679+
- [8.1](#arrows--use-them) When you must use an anonymous function (as when passing an inline callback), use arrow function notation. eslint: [`prefer-arrow-callback`](https://eslint.org/docs/rules/prefer-arrow-callback), [`arrow-spacing`](https://eslint.org/docs/rules/arrow-spacing)
680680

681681
> Why? It creates a version of the function that executes in the context of `this`, which is usually what you want, and is a more concise syntax.
682682
@@ -943,7 +943,7 @@ Heavily inspired by and partly composed of [Airbnb JavaScript Style Guide
943943
```
944944

945945
<a name="modules--no-export-from-import"></a>
946-
- [10.3](modules--no-export-from-import) And do not export directly from an import.
946+
- [10.3](#modules--no-export-from-import) And do not export directly from an import.
947947

948948
> Why? Although the one-liner is concise, having one clear way to import and one clear way to export makes things consistent.
949949
@@ -1718,7 +1718,7 @@ Heavily inspired by and partly composed of [Airbnb JavaScript Style Guide
17181718
## Control Statements
17191719

17201720
<a name="control-statements"></a>
1721-
- [16.1]($control-statements) In case your control statement (`if`, `while` etc.) gets too long or exceeds the maximum line length, each (grouped) condition could be put into a new line. The logical operator should begin the line.
1721+
- [16.1](#control-statements) In case your control statement (`if`, `while` etc.) gets too long or exceeds the maximum line length, each (grouped) condition could be put into a new line. The logical operator should begin the line.
17221722

17231723
> Why? Requiring operators at the beginning of the line keeps the operators aligned and follows a pattern similar to method chaining. This also improves readability by making it easier to visually follow complex logic.
17241724
@@ -1771,7 +1771,7 @@ Heavily inspired by and partly composed of [Airbnb JavaScript Style Guide
17711771
}
17721772
```
17731773

1774-
<a name="control-statement--value-selection"></a><a name="control-statements--value-selection"></a>
1774+
<a name="control-statement--value-selection"></a>
17751775
- [16.2](#control-statement--value-selection) Don't use selection operators in place of control statements.
17761776

17771777
```javascript
@@ -2958,6 +2958,8 @@ Sample config can be found [here](./.eslintrc.js). Feel free to copy it and thou
29582958
In TypeScript we use the same rules as in JavaScript, but we also have some additional guidelines that are specific to typescript.
29592959

29602960
### Naming conventions
2961+
2962+
<a name="typescript--enum-naming-conventions"></a>
29612963
- [25.1](#typescript--enum-naming-conventions) Use `PascalCase` enum names and enum properties.
29622964

29632965
```typescript
@@ -2996,7 +2998,9 @@ In TypeScript we use the same rules as in JavaScript, but we also have some addi
29962998
```
29972999

29983000
### tsconfig flags
2999-
- [26.1](#typescript--tsconfig-flags-) Use `strict: true` in your `tsconfig.json` file.
3001+
3002+
<a name="typescript--tsconfig-strict"></a>
3003+
- [26.1](#typescript--tsconfig-strict) Use `strict: true` in your `tsconfig.json` file.
30003004

30013005
```json
30023006
{
@@ -3006,7 +3010,8 @@ In TypeScript we use the same rules as in JavaScript, but we also have some addi
30063010
}
30073011
```
30083012

3009-
- [26.2](#typescript--tsconfig-flags-) Use `"noUncheckedIndexedAccess": true` in your `tsconfig.json` file. This is a good practice because it prevents you from accessing elements that don't exist. Read more about it [here](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess).
3013+
<a name="typescript--tsconfig-nouncheckedindexedaccess"></a>
3014+
- [26.2](#typescript--tsconfig-nouncheckedindexedaccess) Use `"noUncheckedIndexedAccess": true` in your `tsconfig.json` file. This is a good practice because it prevents you from accessing elements that don't exist. Read more about it [here](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess).
30103015

30113016
```json
30123017
{

0 commit comments

Comments
 (0)