Skip to content

Commit d39b769

Browse files
author
Stella Cannefax
authored
more style updates
1 parent 66d4ba4 commit d39b769

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

README.md

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -749,32 +749,6 @@ Other Style Guides
749749
};
750750
```
751751
752-
<a name="functions--reassign-params"></a><a name="7.13"></a>
753-
- [7.13](#functions--reassign-params) Never reassign parameters. eslint: [`no-param-reassign`](http://eslint.org/docs/rules/no-param-reassign.html)
754-
755-
> Why? Reassigning parameters can lead to unexpected behavior, especially when accessing the `arguments` object. It can also cause optimization issues, especially in V8.
756-
757-
```javascript
758-
// bad
759-
function f1(a) {
760-
a = 1;
761-
}
762-
763-
function f2(a) {
764-
if (!a) { a = 1; }
765-
}
766-
767-
// good
768-
function f3(a) {
769-
const b = a || 1;
770-
}
771-
772-
function f4(a = 1) {
773-
}
774-
```
775-
776-
**[⬆ back to top](#table-of-contents)**
777-
778752
## Arrow Functions
779753
780754
<a name="arrows--use-them"></a><a name="8.1"></a>
@@ -2022,39 +1996,6 @@ Other Style Guides
20221996
return arr;
20231997
```
20241998

2025-
<a name="whitespace--padded-blocks"></a><a name="18.8"></a>
2026-
- [18.8](#whitespace--padded-blocks) Do not pad your blocks with blank lines. eslint: [`padded-blocks`](http://eslint.org/docs/rules/padded-blocks.html) jscs: [`disallowPaddingNewlinesInBlocks`](http://jscs.info/rule/disallowPaddingNewlinesInBlocks)
2027-
2028-
```javascript
2029-
// bad
2030-
function bar() {
2031-
2032-
console.log(foo);
2033-
2034-
}
2035-
2036-
// also bad
2037-
if (baz) {
2038-
2039-
console.log(qux);
2040-
} else {
2041-
console.log(foo);
2042-
2043-
}
2044-
2045-
// good
2046-
function bar() {
2047-
console.log(foo);
2048-
}
2049-
2050-
// good
2051-
if (baz) {
2052-
console.log(qux);
2053-
} else {
2054-
console.log(foo);
2055-
}
2056-
```
2057-
20581999
<a name="whitespace--in-parens"></a><a name="18.9"></a>
20592000
- [18.9](#whitespace--in-parens) Do not add spaces inside parentheses. eslint: [`space-in-parens`](http://eslint.org/docs/rules/space-in-parens.html) jscs: [`disallowSpacesInsideParentheses`](http://jscs.info/rule/disallowSpacesInsideParentheses)
20602001

0 commit comments

Comments
 (0)