Skip to content

Commit ea1735d

Browse files
committed
Avoid positional markers
1 parent c080300 commit ea1735d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -1753,6 +1753,41 @@ function combine(a, b) {
17531753
```
17541754
**[⬆ back to top](#table-of-contents)**
17551755

1756+
### Avoid positional markers
1757+
They usually just add noise. Let the functions and variable names along with the
1758+
proper indentation and formatting give the visual structure to your code.
1759+
1760+
**Bad:**
1761+
```javascript
1762+
////////////////////////////////////////////////////////////////////////////////
1763+
// Scope Model Instantiation
1764+
////////////////////////////////////////////////////////////////////////////////
1765+
let $scope.model = {
1766+
menu: 'foo',
1767+
nav: 'bar'
1768+
};
1769+
1770+
////////////////////////////////////////////////////////////////////////////////
1771+
// Action setup
1772+
////////////////////////////////////////////////////////////////////////////////
1773+
let actions = function() {
1774+
// ...
1775+
}
1776+
```
1777+
1778+
**Good**:
1779+
```javascript
1780+
let $scope.model = {
1781+
menu: 'foo',
1782+
nav: 'bar'
1783+
};
1784+
1785+
let actions = function() {
1786+
// ...
1787+
}
1788+
```
1789+
**[⬆ back to top](#table-of-contents)**
1790+
17561791
### Avoid legal comments in source files
17571792
That's what your `LICENSE` file at the top of your source tree is for.
17581793

0 commit comments

Comments
 (0)