Skip to content

Commit a371d73

Browse files
author
Asher Dale
authored
Update README, fixed badly-styled eslint links
There were links to eslint rules in a style that didn't match the style of the rest of the document. Specifically, most links in the document use the following style: "eslint: ['no-unneeded-ternary']", but there were badly styled links that looks like this: "eslint rule: ['no-unneeded-ternary']." Additionally, the badly styled links were on their own line, whereas all the other links are not placed on their own line.
1 parent 3cc6269 commit a371d73

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -1838,12 +1838,10 @@ Other Style Guides
18381838
- [15.4](#comparison--moreinfo) For more information see [Truth Equality and JavaScript](https://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/#more-2108) by Angus Croll.
18391839
18401840
<a name="comparison--switch-blocks"></a><a name="15.5"></a>
1841-
- [15.5](#comparison--switch-blocks) Use braces to create blocks in `case` and `default` clauses that contain lexical declarations (e.g. `let`, `const`, `function`, and `class`).
1841+
- [15.5](#comparison--switch-blocks) Use braces to create blocks in `case` and `default` clauses that contain lexical declarations (e.g. `let`, `const`, `function`, and `class`). eslint rules: [`no-case-declarations`](http://eslint.org/docs/rules/no-case-declarations.html)
18421842

18431843
> Why? Lexical declarations are visible in the entire `switch` block but only get initialized when assigned, which only happens when its `case` is reached. This causes problems when multiple `case` clauses attempt to define the same thing.
18441844

1845-
eslint rules: [`no-case-declarations`](http://eslint.org/docs/rules/no-case-declarations.html).
1846-
18471845
```javascript
18481846
// bad
18491847
switch (foo) {
@@ -1888,9 +1886,7 @@ Other Style Guides
18881886
```
18891887

18901888
<a name="comparison--nested-ternaries"></a><a name="15.6"></a>
1891-
- [15.6](#comparison--nested-ternaries) Ternaries should not be nested and generally be single line expressions.
1892-
1893-
eslint rules: [`no-nested-ternary`](http://eslint.org/docs/rules/no-nested-ternary.html).
1889+
- [15.6](#comparison--nested-ternaries) Ternaries should not be nested and generally be single line expressions. eslint: [`no-nested-ternary`](http://eslint.org/docs/rules/no-nested-ternary.html)
18941890

18951891
```javascript
18961892
// bad
@@ -1912,9 +1908,7 @@ Other Style Guides
19121908
```
19131909

19141910
<a name="comparison--unneeded-ternary"></a><a name="15.7"></a>
1915-
- [15.7](#comparison--unneeded-ternary) Avoid unneeded ternary statements.
1916-
1917-
eslint rules: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary.html).
1911+
- [15.7](#comparison--unneeded-ternary) Avoid unneeded ternary statements. eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary.html)
19181912

19191913
```javascript
19201914
// bad

0 commit comments

Comments
 (0)