wesaynih / infrastructure

© 2016 The Knights Who Say NIH — Do NOT fork this repository without permission.
http://frameless.io/
Other
0 stars 1 forks source link

Lint JavaScript block comments #50

Closed Robbert closed 8 years ago

Robbert commented 8 years ago

Block comments should either contain text or code.

All natural language in block comments must be prefixed with * like JSDoc comments, but it should not have /** at the start, but only one asterisk: /*

Commented out code blocks must be checked to have valid syntax, so editor could be configured to enable syntax highlighting for these blocks, but with faded colors.

For example:


/* FIXME: Move `new Loader` back to the upper scope, and reuse one loader for all `require` calls.
 * 
 * Because `require()` doesn't have an error callback specifically for that module and its
 * dependency tree, we need to use a workaround to get errors exclusively for one call:
 * create a `new Loader` for every require call. This way the `onerror` callback will only report
 * errors that are related.
 */

/*
var loader = new Choir.Loader(new Choir.URI('src/')),
builder = new Choir.Builder(loader);
*/
Robbert commented 8 years ago

Perhaps we should also disallow n consecutive lines of line comments:

// XMLContentHandler.prototype.characters = function (data, offset, length)
// {
    //
// };

Block comments are preferred.