enable JSHint's "newcap" test

This commit is contained in:
Jeff Williams 2012-07-04 16:05:08 -07:00
parent dabb0b4410
commit c60f68286f
3 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@
"forin": true,
"immed": true,
"latedef": false,
"newcap": false,
"newcap": true,
"noarg": false,
"noempty": false,
"nonew": false,

View File

@ -263,8 +263,8 @@ function main() {
}
if (/(\bREADME|\.md)$/i.test(env.opts._[i])) {
var readme = require('jsdoc/readme');
env.opts.readme = new readme(env.opts._[i]).html;
var Readme = require('jsdoc/readme');
env.opts.readme = new Readme(env.opts._[i]).html;
env.opts._.splice(i--, 1);
}
}

View File

@ -9,7 +9,8 @@ var _synonyms = {},
_namespaces = [],
hasOwnProp = Object.prototype.hasOwnProperty;
function _TagDefinition(title, etc) {
/** @private */
function TagDefinition(title, etc) {
etc = etc || {};
this.title = dictionary.normalise(title);
@ -21,7 +22,8 @@ function _TagDefinition(title, etc) {
}
}
_TagDefinition.prototype.synonym = function(synonymName) {
/** @private */
TagDefinition.prototype.synonym = function(synonymName) {
_synonyms[synonymName.toLowerCase()] = this.title;
return this; // chainable
}
@ -30,7 +32,7 @@ _TagDefinition.prototype.synonym = function(synonymName) {
var dictionary = {
/** @function */
defineTag: function(title, opts) {
_definitions[title] = new _TagDefinition(title, opts);
_definitions[title] = new TagDefinition(title, opts);
if (opts.isNamespace) {
_namespaces.push(title);