Skip to content

Commit

Permalink
[comments] add FIXME and TODO annotations. Fixes airbnb#62
Browse files Browse the repository at this point in the history
  • Loading branch information
hshoff committed Mar 17, 2013
1 parent a15b27e commit cad9032
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,32 @@
}
```

- Prefixing your comments with `FIXME` or `TODO` helps other developers quickly understand if you're pointing out a problem that needs to be revisited, or if you're suggesting a solution to the problem that needs to be implemented. These are different than regular comments because they are actionable. The actions are `FIXME -- need to figure this out` or `TODO -- need to implement`.

- Use `// FIXME:` to annotate problems

```javascript
function Calculator() {
// FIXME: shouldn't use a global here
total = 0;
return this;
}
```

- Use `// TODO:` to annotate solutions to problems

```javascript
function Calculator() {
// TODO: total should be configurable by an options param
this.total = 0;
return this;
}
```

**[[⬆]](#TOC)**


Expand Down

0 comments on commit cad9032

Please sign in to comment.