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
- [3.2](#3.2) <a name='3.2'></a> If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code.
148
+
- [3.2](#3.2) <a name='3.2'></a> If your code will be executed in browsers in script context, don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/pebblecode/javascript/issues/61). It’s OK to use them in ES6 modules and server-side code.
149
149
150
150
```javascript
151
151
// bad
@@ -408,7 +408,7 @@ Other Style Guides
408
408
```
409
409
410
410
- [6.2](#6.2) <a name='6.2'></a> Strings longer than 100 characters should be written across multiple lines using string concatenation.
411
-
- [6.3](#6.3) <a name='6.3'></a> Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40).
411
+
- [6.3](#6.3) <a name='6.3'></a> Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebblecode/javascript/issues/40).
- [21.5](#21.5) <a name='21.5'></a> **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647:
1719
+
- [21.5](#21.5) <a name='21.5'></a> **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebblecode/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647:
1720
1720
1721
1721
```javascript
1722
1722
2147483647>>0//=> 2147483647
@@ -1864,12 +1864,12 @@ Other Style Guides
1864
1864
- [22.8](#22.8) <a name='22.8'></a> Use PascalCase when you export a singleton / function library / bare object.
1865
1865
1866
1866
```javascript
1867
-
constAirbnbStyleGuide= {
1867
+
constpebblecodeStyleGuide= {
1868
1868
es6: {
1869
1869
}
1870
1870
};
1871
1871
1872
-
exportdefaultAirbnbStyleGuide;
1872
+
exportdefaultpebblecodeStyleGuide;
1873
1873
```
1874
1874
1875
1875
@@ -2067,7 +2067,7 @@ Other Style Guides
2067
2067
- Whichever testing framework you use, you should be writing tests!
2068
2068
- Strive to write many small pure functions, and minimize where mutations occur.
2069
2069
- Be cautious about stubs and mocks - they can make your tests more brittle.
2070
-
- 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.
2070
+
- We primarily use [`mocha`](https://www.npmjs.com/package/mocha) at pebblecode. [`tape`](https://www.npmjs.com/package/tape) is also used occasionally for small, separate modules.
2071
2071
- 100% test coverage is a good goal to strive for, even if it's not always practical to reach it.
2072
2072
- 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.
- Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work inIE8. [More info](https://github.com/airbnb/javascript/issues/61).
89
+
- Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work inIE8. [More info](https://github.com/pebblecode/javascript/issues/61).
90
90
91
91
```javascript
92
92
// bad
@@ -195,7 +195,7 @@
195
195
```
196
196
197
197
- Strings longer than 100 characters should be written across multiple lines using string concatenation.
198
-
- Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40).
198
+
- Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/pebblecode/javascript/issues/40).
199
199
200
200
```javascript
201
201
// bad
@@ -1100,7 +1100,7 @@
1100
1100
var val = inputValue >>0;
1101
1101
```
1102
1102
1103
-
- **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647:
1103
+
- **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/pebblecode/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647:
1104
1104
1105
1105
```javascript
1106
1106
2147483647>>0//=> 2147483647
@@ -1427,7 +1427,7 @@
1427
1427
1428
1428
## Modules
1429
1429
1430
-
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/airbnb/javascript/issues/44#issuecomment-13063933)
1430
+
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/pebblecode/javascript/issues/44#issuecomment-13063933)
1431
1431
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
1432
1432
- Add a method called `noConflict()` that sets the exported module to the previous version and returns this one.
1433
1433
- Always declare `'use strict';` at the top of the module.
0 commit comments