Skip to content

Commit fd8cbec

Browse files
committed
[guide] change straight quotes to curly quotes
1 parent 1bbac74 commit fd8cbec

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Other Style Guides
227227
<a name="objects--grouped-shorthand"></a><a name="3.7"></a>
228228
- [3.5](#objects--grouped-shorthand) Group your shorthand properties at the beginning of your object declaration.
229229
230-
> Why? It's easier to tell which properties are using the shorthand.
230+
> Why? Its easier to tell which properties are using the shorthand.
231231
232232
```javascript
233233
const anakinSkywalker = 'Anakin Skywalker';
@@ -369,7 +369,7 @@ Other Style Guides
369369
```
370370
371371
<a name="arrays--callback-return"></a><a name="4.5"></a>
372-
- [4.5](#arrays--callback-return) Use return statements in array method callbacks. It's ok to omit the return if the function body consists of a single statement following [8.2](#arrows--implicit-return). eslint: [`array-callback-return`](http://eslint.org/docs/rules/array-callback-return)
372+
- [4.5](#arrays--callback-return) Use return statements in array method callbacks. Its ok to omit the return if the function body consists of a single statement following [8.2](#arrows--implicit-return). eslint: [`array-callback-return`](http://eslint.org/docs/rules/array-callback-return)
373373
374374
```javascript
375375
// good
@@ -615,7 +615,7 @@ Other Style Guides
615615
<a name="functions--declarations"></a><a name="7.1"></a>
616616
- [7.1](#functions--declarations) Use named function expressions instead of function declarations. eslint: [`func-style`](http://eslint.org/docs/rules/func-style) jscs: [`disallowFunctionDeclarations`](http://jscs.info/rule/disallowFunctionDeclarations)
617617
618-
> Why? Function declarations are hoisted, which means that it’s easy - too easy - to reference the function before it is defined in the file. This harms readability and maintainability. If you find that a function’s definition is large or complex enough that it is interfering with understanding the rest of the file, then perhaps it’s time to extract it to its own module! Don’t forget to name the expression - anonymous functions can make it harder to locate the problem in an Error's call stack. ([Discussion](https://github.com/airbnb/javascript/issues/794))
618+
> Why? Function declarations are hoisted, which means that it’s easy - too easy - to reference the function before it is defined in the file. This harms readability and maintainability. If you find that a function’s definition is large or complex enough that it is interfering with understanding the rest of the file, then perhaps it’s time to extract it to its own module! Don’t forget to name the expression - anonymous functions can make it harder to locate the problem in an Errors call stack. ([Discussion](https://github.com/airbnb/javascript/issues/794))
619619
620620
```javascript
621621
// bad
@@ -650,7 +650,7 @@ Other Style Guides
650650
- [7.3](#functions--in-blocks) Never declare a function in a non-function block (`if`, `while`, etc). Assign the function to a variable instead. Browsers will allow you to do it, but they all interpret it differently, which is bad news bears. eslint: [`no-loop-func`](http://eslint.org/docs/rules/no-loop-func.html)
651651
652652
<a name="functions--note-on-blocks"></a><a name="7.4"></a>
653-
- [7.4](#functions--note-on-blocks) **Note:** ECMA-262 defines a `block` as a list of statements. A function declaration is not a statement. [Read ECMA-262's note on this issue](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=97).
653+
- [7.4](#functions--note-on-blocks) **Note:** ECMA-262 defines a `block` as a list of statements. A function declaration is not a statement. [Read ECMA-262s note on this issue](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=97).
654654
655655
```javascript
656656
// bad
@@ -838,7 +838,7 @@ Other Style Guides
838838
<a name="functions--spread-vs-apply"></a><a name="7.14"></a>
839839
- [7.14](#functions--spread-vs-apply) Prefer the use of the spread operator `...` to call variadic functions. eslint: [`prefer-spread`](http://eslint.org/docs/rules/prefer-spread)
840840

841-
> Why? It's cleaner, you don't need to supply a context, and you can not easily compose `new` with `apply`.
841+
> Why? Its cleaner, you don't need to supply a context, and you can not easily compose `new` with `apply`.
842842
843843
```javascript
844844
// bad
@@ -964,7 +964,7 @@ Other Style Guides
964964
```
965965
966966
<a name="arrows--one-arg-parens"></a><a name="8.4"></a>
967-
- [8.4](#arrows--one-arg-parens) If your function takes a single argument and doesn’t use braces, omit the parentheses. Otherwise, always include parentheses around arguments for clarity and consistency. Note: it is also acceptable to always use parentheses, in which case use the ["always" option](http://eslint.org/docs/rules/arrow-parens#always) for eslint or do not include [`disallowParenthesesAroundArrowParam`](http://jscs.info/rule/disallowParenthesesAroundArrowParam) for jscs. eslint: [`arrow-parens`](http://eslint.org/docs/rules/arrow-parens.html) jscs: [`disallowParenthesesAroundArrowParam`](http://jscs.info/rule/disallowParenthesesAroundArrowParam)
967+
- [8.4](#arrows--one-arg-parens) If your function takes a single argument and doesn’t use braces, omit the parentheses. Otherwise, always include parentheses around arguments for clarity and consistency. Note: it is also acceptable to always use parentheses, in which case use the [always option](http://eslint.org/docs/rules/arrow-parens#always) for eslint or do not include [`disallowParenthesesAroundArrowParam`](http://jscs.info/rule/disallowParenthesesAroundArrowParam) for jscs. eslint: [`arrow-parens`](http://eslint.org/docs/rules/arrow-parens.html) jscs: [`disallowParenthesesAroundArrowParam`](http://jscs.info/rule/disallowParenthesesAroundArrowParam)
968968
969969
> Why? Less visual clutter.
970970
@@ -1108,7 +1108,7 @@ Other Style Guides
11081108
```
11091109
11101110
<a name="constructors--tostring"></a><a name="9.4"></a>
1111-
- [9.4](#constructors--tostring) It's okay to write a custom toString() method, just make sure it works successfully and causes no side effects.
1111+
- [9.4](#constructors--tostring) Its okay to write a custom toString() method, just make sure it works successfully and causes no side effects.
11121112
11131113
```javascript
11141114
class Jedi {
@@ -1185,7 +1185,7 @@ Other Style Guides
11851185
<a name="modules--use-them"></a><a name="10.1"></a>
11861186
- [10.1](#modules--use-them) Always use modules (`import`/`export`) over a non-standard module system. You can always transpile to your preferred module system.
11871187
1188-
> Why? Modules are the future, let's start using the future now.
1188+
> Why? Modules are the future, lets start using the future now.
11891189
11901190
```javascript
11911191
// bad
@@ -1336,7 +1336,7 @@ Other Style Guides
13361336
## Iterators and Generators
13371337
13381338
<a name="iterators--nope"></a><a name="11.1"></a>
1339-
- [11.1](#iterators--nope) Don't use iterators. Prefer JavaScript's higher-order functions instead of loops like `for-in` or `for-of`. eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator.html) [`no-restricted-syntax`](http://eslint.org/docs/rules/no-restricted-syntax)
1339+
- [11.1](#iterators--nope) Don't use iterators. Prefer JavaScripts higher-order functions instead of loops like `for-in` or `for-of`. eslint: [`no-iterator`](http://eslint.org/docs/rules/no-iterator.html) [`no-restricted-syntax`](http://eslint.org/docs/rules/no-restricted-syntax)
13401340

13411341
> Why? This enforces our immutable rule. Dealing with pure functions that return values is easier to reason about than side effects.
13421342

@@ -1495,7 +1495,7 @@ Other Style Guides
14951495
<a name="variables--one-const"></a><a name="13.2"></a>
14961496
- [13.2](#variables--one-const) Use one `const` or `let` declaration per variable. eslint: [`one-var`](http://eslint.org/docs/rules/one-var.html) jscs: [`disallowMultipleVarDecl`](http://jscs.info/rule/disallowMultipleVarDecl)
14971497

1498-
> Why? It's easier to add new variable declarations this way, and you never have to worry about swapping out a `;` for a `,` or introducing punctuation-only diffs. You can also step through each declaration with the debugger, instead of jumping through all of them at once.
1498+
> Why? Its easier to add new variable declarations this way, and you never have to worry about swapping out a `;` for a `,` or introducing punctuation-only diffs. You can also step through each declaration with the debugger, instead of jumping through all of them at once.
14991499

15001500
```javascript
15011501
// bad
@@ -1651,7 +1651,7 @@ Other Style Guides
16511651
## Hoisting
16521652
16531653
<a name="hoisting--about"></a><a name="14.1"></a>
1654-
- [14.1](#hoisting--about) `var` declarations get hoisted to the top of their scope, their assignment does not. `const` and `let` declarations are blessed with a new concept called [Temporal Dead Zones (TDZ)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_and_errors_with_let). It's important to know why [typeof is no longer safe](http://es-discourse.com/t/why-typeof-is-no-longer-safe/15).
1654+
- [14.1](#hoisting--about) `var` declarations get hoisted to the top of their scope, their assignment does not. `const` and `let` declarations are blessed with a new concept called [Temporal Dead Zones (TDZ)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_and_errors_with_let). Its important to know why [typeof is no longer safe](http://es-discourse.com/t/why-typeof-is-no-longer-safe/15).
16551655

16561656
```javascript
16571657
// we know this wouldn't work (assuming there
@@ -1928,7 +1928,7 @@ Other Style Guides
19281928
```
19291929

19301930
<a name="blocks--cuddled-elses"></a><a name="16.2"></a>
1931-
- [16.2](#blocks--cuddled-elses) If you're using multi-line blocks with `if` and `else`, put `else` on the same line as your `if` block's closing brace. eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style.html) jscs: [`disallowNewlineBeforeBlockStatements`](http://jscs.info/rule/disallowNewlineBeforeBlockStatements)
1931+
- [16.2](#blocks--cuddled-elses) If you're using multi-line blocks with `if` and `else`, put `else` on the same line as your `if` blocks closing brace. eslint: [`brace-style`](http://eslint.org/docs/rules/brace-style.html) jscs: [`disallowNewlineBeforeBlockStatements`](http://jscs.info/rule/disallowNewlineBeforeBlockStatements)
19321932
19331933
```javascript
19341934
// bad
@@ -1954,7 +1954,7 @@ Other Style Guides
19541954
## Control Statements
19551955
19561956
<a name="control-statements"></a>
1957-
- [17.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. It's up to you whether the logical operator should begin or end the line.
1957+
- [17.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. Its up to you whether the logical operator should begin or end the line.
19581958
19591959
```javascript
19601960
// bad
@@ -2040,7 +2040,7 @@ Other Style Guides
20402040
```
20412041
20422042
<a name="comments--singleline"></a><a name="17.2"></a>
2043-
- [18.2](#comments--singleline) Use `//` for single line comments. Place single line comments on a newline above the subject of the comment. Put an empty line before the comment unless it's on the first line of a block.
2043+
- [18.2](#comments--singleline) Use `//` for single line comments. Place single line comments on a newline above the subject of the comment. Put an empty line before the comment unless its on the first line of a block.
20442044
20452045
```javascript
20462046
// bad
@@ -2859,7 +2859,7 @@ Other Style Guides
28592859
```
28602860
28612861
<a name="naming--camelCase-default-export"></a><a name="22.7"></a>
2862-
- [23.7](#naming--camelCase-default-export) Use camelCase when you export-default a function. Your filename should be identical to your function's name.
2862+
- [23.7](#naming--camelCase-default-export) Use camelCase when you export-default a function. Your filename should be identical to your functions name.
28632863
28642864
```javascript
28652865
function makeStyleGuide() {
@@ -2962,7 +2962,7 @@ Other Style Guides
29622962
```
29632963
29642964
<a name="accessors--consistent"></a><a name="23.4"></a>
2965-
- [24.4](#accessors--consistent) It's okay to create get() and set() functions, but be consistent.
2965+
- [24.4](#accessors--consistent) Its okay to create get() and set() functions, but be consistent.
29662966
29672967
```javascript
29682968
class Jedi {
@@ -3086,7 +3086,7 @@ Other Style Guides
30863086
## ECMAScript 5 Compatibility
30873087
30883088
<a name="es5-compat--kangax"></a><a name="26.1"></a>
3089-
- [27.1](#es5-compat--kangax) Refer to [Kangax](https://twitter.com/kangax/)'s ES5 [compatibility table](https://kangax.github.io/es5-compat-table/).
3089+
- [27.1](#es5-compat--kangax) Refer to [Kangax](https://twitter.com/kangax/)s ES5 [compatibility table](https://kangax.github.io/es5-compat-table/).
30903090
30913091
**[⬆ back to top](#table-of-contents)**
30923092
@@ -3134,7 +3134,7 @@ Other Style Guides
31343134
- Strive to write many small pure functions, and minimize where mutations occur.
31353135
- Be cautious about stubs and mocks - they can make your tests more brittle.
31363136
- We primarily use [`mocha`](https://www.npmjs.com/package/mocha) at Airbnb. [`tape`](https://www.npmjs.com/package/tape) is also used occasionally for small, separate modules.
3137-
- 100% test coverage is a good goal to strive for, even if it's not always practical to reach it.
3137+
- 100% test coverage is a good goal to strive for, even if its not always practical to reach it.
31383138
- Whenever you fix a bug, _write a regression test_. A bug fixed without a regression test is almost certainly going to break again in the future.
31393139
31403140
**[⬆ back to top](#table-of-contents)**
@@ -3388,6 +3388,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33883388
33893389
## Amendments
33903390
3391-
We encourage you to fork this guide and change the rules to fit your team's style guide. Below, you may list some amendments to the style guide. This allows you to periodically update your style guide without having to deal with merge conflicts.
3391+
We encourage you to fork this guide and change the rules to fit your teams style guide. Below, you may list some amendments to the style guide. This allows you to periodically update your style guide without having to deal with merge conflicts.
33923392
33933393
# };

0 commit comments

Comments
 (0)