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.
This commit is contained in:
Asher Dale
2017-07-25 15:46:30 -04:00
committed by GitHub
parent 3cc6269c86
commit a371d73414

View File

@@ -1838,12 +1838,10 @@ Other Style Guides
- [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.
<a name="comparison--switch-blocks"></a><a name="15.5"></a>
- [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`).
- [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)
> 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.
eslint rules: [`no-case-declarations`](http://eslint.org/docs/rules/no-case-declarations.html).
```javascript
// bad
switch (foo) {
@@ -1888,9 +1886,7 @@ Other Style Guides
```
<a name="comparison--nested-ternaries"></a><a name="15.6"></a>
- [15.6](#comparison--nested-ternaries) Ternaries should not be nested and generally be single line expressions.
eslint rules: [`no-nested-ternary`](http://eslint.org/docs/rules/no-nested-ternary.html).
- [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)
```javascript
// bad
@@ -1912,9 +1908,7 @@ Other Style Guides
```
<a name="comparison--unneeded-ternary"></a><a name="15.7"></a>
- [15.7](#comparison--unneeded-ternary) Avoid unneeded ternary statements.
eslint rules: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary.html).
- [15.7](#comparison--unneeded-ternary) Avoid unneeded ternary statements. eslint: [`no-unneeded-ternary`](http://eslint.org/docs/rules/no-unneeded-ternary.html)
```javascript
// bad