You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codify existing practices for writing Markdown in style guides and
enforce them via Markdownlint. A new npm script "lint" in the top level
package.json runs before tests or as the first step of the "travis"
script.
Only modify documents in cases where they had bugs or isolated cases of
inconsistency:
README.md: 10: MD007 Unordered list indentation
Inconsistent with all other top level lists
README.md: 10: MD032 Lists should be surrounded by blank lines
Some Markdown parsers don't handle this correctly
README.md: 3156-3161: MD005 Inconsistent indentation for list items at
the same level
Bug, looks like it's intended to be another list level but GitHub
renders it at the same level as the "No but seriously"
README.md & css-in-javascript/README.md: throughout: MD012 Multiple
consecutive blank lines
README.md: throughout: MD004 Unordered list style
Some nested lists used plusses, now everything consistently uses
dashes.
- [15.2](#comparison--if) Conditional statements such as the `if` statement evaluate their expression using coercion with the `ToBoolean` abstract method and always follow these simple rules:
1767
1757
1768
-
+ **Objects** evaluate to **true**
1769
-
+ **Undefined** evaluates to **false**
1770
-
+ **Null** evaluates to **false**
1771
-
+ **Booleans** evaluate to **the value of the boolean**
1772
-
+ **Numbers** evaluate to **false** if **+0, -0, or NaN**, otherwise **true**
1773
-
+ **Strings** evaluate to **false** if an empty string `''`, otherwise **true**
1758
+
- **Objects** evaluate to **true**
1759
+
- **Undefined** evaluates to **false**
1760
+
- **Null** evaluates to **false**
1761
+
- **Booleans** evaluate to **the value of the boolean**
1762
+
- **Numbers** evaluate to **false** if **+0, -0, or NaN**, otherwise **true**
1763
+
- **Strings** evaluate to **false** if an empty string `''`, otherwise **true**
- [29.2](#testing--for-real) **No, but seriously**:
3156
-
- Whichever testing framework you use, you should be writing tests!
3157
-
- Strive to write many small pure functions, and minimize where mutations occur.
3158
-
- Be cautious about stubs and mocks - they can make your tests more brittle.
3159
-
- 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.
3160
-
- 100% test coverage is a good goal to strive for, even if it's not always practical to reach it.
3161
-
- 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.
3133
+
- Whichever testing framework you use, you should be writing tests!
3134
+
- Strive to write many small pure functions, and minimize where mutations occur.
3135
+
- Be cautious about stubs and mocks - they can make your tests more brittle.
3136
+
- 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.
3138
+
- 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.
3162
3139
3163
3140
**[⬆ back to top](#table-of-contents)**
3164
3141
3165
-
3166
3142
## Performance
3167
3143
3168
3144
- [On Layout & Web Performance](https://www.kellegous.com/j/2013/01/26/layout-performance/)
0 commit comments