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
Copy file name to clipboardexpand all lines: README.md
+22-21
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# Airbnb JavaScript Style Guide() {
1
+
# Zillow JavaScript Style Guide() {
2
2
3
3
*A mostly reasonable approach to JavaScript*
4
4
5
5
> **Note**: this guide assumes you are using [Babel](https://babeljs.io), and requires that you use [babel-preset-airbnb](https://npmjs.com/babel-preset-airbnb) or the equivalent. It also assumes you are installing shims/polyfills in your app, with [airbnb-browser-shims](https://npmjs.com/airbnb-browser-shims) or the equivalent.
$.ajax({ method: 'POST', url: 'https://airbnb.com/', data: { name: 'John' } }).done(() => console.log('Congratulations!')).fail(() => console.log('You have failed this city.'));
2647
+
$.ajax({ method: 'POST', url: 'https://zillow.com/', data: { name: 'John' } }).done(() => console.log('Congratulations!')).fail(() => console.log('You have failed this city.'));
2648
2648
2649
2649
// good
2650
2650
const foo = jsonData
@@ -2657,7 +2657,7 @@ Other Style Guides
2657
2657
// good
2658
2658
$.ajax({
2659
2659
method: 'POST',
2660
-
url: 'https://airbnb.com/',
2660
+
url: 'https://zillow.com/',
2661
2661
data: { name: 'John' },
2662
2662
})
2663
2663
.done(() => console.log('Congratulations!'))
@@ -3095,12 +3095,12 @@ Other Style Guides
3095
3095
- [23.8](#naming--PascalCase-singleton) Use PascalCase when you export a constructor / class / singleton / function library / bare object.
3096
3096
3097
3097
```javascript
3098
-
constAirbnbStyleGuide= {
3098
+
constZillowStyleGuide= {
3099
3099
es6: {
3100
3100
},
3101
3101
};
3102
3102
3103
-
exportdefaultAirbnbStyleGuide;
3103
+
exportdefaultZillowStyleGuide;
3104
3104
```
3105
3105
3106
3106
<a name="naming--Acronyms-and-Initialisms"></a>
@@ -3439,7 +3439,7 @@ Other Style Guides
3439
3439
- Whichever testing framework you use, you should be writing tests!
3440
3440
- Strive to write many small pure functions, and minimize where mutations occur.
3441
3441
- Be cautious about stubs and mocks - they can make your tests more brittle.
3442
-
- We primarily use [`mocha`](https://www.npmjs.com/package/mocha) and [`jest`](https://www.npmjs.com/package/jest) at Airbnb. [`tape`](https://www.npmjs.com/package/tape) is also used occasionally for small, separate modules.
3442
+
- We primarily use [`mocha`](https://www.npmjs.com/package/mocha) and [`jest`](https://www.npmjs.com/package/jest) at Zillow.
3443
3443
-100% test coverage is a good goal to strive for, even if it’s not always practical to reach it.
3444
3444
- 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.
0 commit comments