[modules] add link to @reissbaker's explanation of bangs, cat, ASI, and newlines

This commit is contained in:
Harrison Shoff
2013-09-30 15:38:22 -07:00
parent a0cefb8162
commit c8442b484c

View File

@@ -1270,7 +1270,7 @@
## <a name='modules'>Modules</a>
- 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.
- 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)
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
- Add a method called noConflict() that sets the exported module to the previous version and returns this one.
- Always declare `'use strict';` at the top of the module.