Skip to content

Commit e6004be

Browse files
nzakasgyandeeps
authored andcommitted
Chore: Enable preferType in valid-jsdoc (refs #5188) (#6634)
1 parent ca323cf commit e6004be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+166
-157
lines changed

Makefile.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function getBranches() {
329329
/**
330330
* Lints Markdown files.
331331
* @param {array} files Array of file names to lint.
332-
* @returns {object} exec-style exit code object.
332+
* @returns {Object} exec-style exit code object.
333333
* @private
334334
*/
335335
function lintMarkdown(files) {
@@ -837,7 +837,7 @@ target.checkLicenses = function() {
837837

838838
/**
839839
* Check if a dependency is eligible to be used by us
840-
* @param {object} dependency dependency to check
840+
* @param {Object} dependency dependency to check
841841
* @returns {boolean} true if we have permission
842842
* @private
843843
*/
@@ -950,7 +950,7 @@ target.checkGitCommit = function() {
950950
/**
951951
* Downloads a repository which has many js files to test performance with multi files.
952952
* Here, it's eslint@1.10.3 (450 files)
953-
* @param {function} cb - A callback function.
953+
* @param {Function} cb - A callback function.
954954
* @returns {void}
955955
*/
956956
function downloadMultifilesTestTarget(cb) {
@@ -993,7 +993,7 @@ function createConfigForPerformanceTest() {
993993
* @param {int} runs Total number of runs to do
994994
* @param {int} runNumber Current run number
995995
* @param {int[]} results Collection results from each run
996-
* @param {function} cb Function to call when everything is done
996+
* @param {Function} cb Function to call when everything is done
997997
* @returns {int[]} calls the cb with all the results
998998
* @private
999999
*/
@@ -1033,7 +1033,7 @@ function time(cmd, runs, runNumber, results, cb) {
10331033
* @param {string} title - A title.
10341034
* @param {string} targets - Test targets.
10351035
* @param {number} multiplier - A multiplier for limitation.
1036-
* @param {function} cb - A callback function.
1036+
* @param {Function} cb - A callback function.
10371037
* @returns {void}
10381038
*/
10391039
function runPerformanceTest(title, targets, multiplier, cb) {

lib/cli-engine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ function createIgnoreResult(filePath, baseDir) {
340340

341341
/**
342342
* Checks if the given message is an error message.
343-
* @param {object} message The message to check.
343+
* @param {Object} message The message to check.
344344
* @returns {boolean} Whether or not the message is an error message.
345345
* @private
346346
*/

lib/code-path-analysis/code-path-state.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function finalizeTestSegmentsOfFor(context, choiceContext, head) {
225225
* @constructor
226226
* @param {IdGenerator} idGenerator - An id generator to generate id for code
227227
* path segments.
228-
* @param {function} onLooped - A callback function to notify looping.
228+
* @param {Function} onLooped - A callback function to notify looping.
229229
*/
230230
function CodePathState(idGenerator, onLooped) {
231231
this.idGenerator = idGenerator;
@@ -1280,7 +1280,7 @@ CodePathState.prototype = {
12801280
* @param {boolean} breakable - The flag to indicate it can break by
12811281
* an unlabeled BreakStatement.
12821282
* @param {string|null} label - The label of this context.
1283-
* @returns {object} The new context.
1283+
* @returns {Object} The new context.
12841284
*/
12851285
pushBreakContext: function(breakable, label) {
12861286
this.breakContext = {
@@ -1295,7 +1295,7 @@ CodePathState.prototype = {
12951295
/**
12961296
* Removes the top item of the break context stack.
12971297
*
1298-
* @returns {object} The removed context.
1298+
* @returns {Object} The removed context.
12991299
*/
13001300
popBreakContext: function() {
13011301
var context = this.breakContext;

lib/code-path-analysis/code-path.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var IdGenerator = require("./id-generator");
2222
* @constructor
2323
* @param {string} id - An identifier.
2424
* @param {CodePath|null} upper - The code path of the upper function scope.
25-
* @param {function} onLooped - A callback function to notify looping.
25+
* @param {Function} onLooped - A callback function to notify looping.
2626
*/
2727
function CodePath(id, upper, onLooped) {
2828

@@ -117,10 +117,10 @@ CodePath.prototype = {
117117
* - `controller.skip()` - Skip the following segments in this branch.
118118
* - `controller.break()` - Skip all following segments.
119119
*
120-
* @param {object} [options] - Omittable.
120+
* @param {Object} [options] - Omittable.
121121
* @param {CodePathSegment} [options.first] - The first segment to traverse.
122122
* @param {CodePathSegment} [options.last] - The last segment to traverse.
123-
* @param {function} callback - A callback function.
123+
* @param {Function} callback - A callback function.
124124
* @returns {void}
125125
*/
126126
traverseSegments: function(options, callback) {

lib/code-path-analysis/debug-helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module.exports = {
140140
* The DOT code can be visialized with Graphvis.
141141
*
142142
* @param {CodePath} codePath - A code path to make DOT.
143-
* @param {object} traceMap - Optional. A map to check whether or not segments had been done.
143+
* @param {Object} traceMap - Optional. A map to check whether or not segments had been done.
144144
* @returns {string} A DOT code of the code path.
145145
*/
146146
makeDotArrows: function(codePath, traceMap) {

lib/code-path-analysis/fork-context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function isReachable(segment) {
4040
* @param {ForkContext} context - An instance.
4141
* @param {number} begin - The first index of the previous segments.
4242
* @param {number} end - The last index of the previous segments.
43-
* @param {function} create - A factory function of new segments.
43+
* @param {Function} create - A factory function of new segments.
4444
* @returns {CodePathSegment[]} New segments.
4545
*/
4646
function makeSegments(context, begin, end, create) {

lib/config/config-initializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ function getConfigForStyleGuide(guide) {
293293
/* istanbul ignore next: no need to test inquirer*/
294294
/**
295295
* Ask use a few questions on command prompt
296-
* @param {function} callback callback function when file has been written
296+
* @param {Function} callback callback function when file has been written
297297
* @returns {void}
298298
*/
299299
function promptUser(callback) {

lib/config/config-ops.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ module.exports = {
267267

268268
/**
269269
* Checks whether every rule of a given config has valid severity or not.
270-
* @param {object} config - The configuration for rules.
270+
* @param {Object} config - The configuration for rules.
271271
* @returns {boolean} `true` if the configuration has valid severity.
272272
*/
273273
isEverySeverityValid: function(config) {

lib/config/config-validator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var validators = {
2525
/**
2626
* Gets a complete options schema for a rule.
2727
* @param {string} id The rule's unique name.
28-
* @returns {object} JSON Schema for the rule's options.
28+
* @returns {Object} JSON Schema for the rule's options.
2929
*/
3030
function getRuleOptionsSchema(id) {
3131
var rule = rules.get(id),
@@ -119,7 +119,7 @@ function validateRuleOptions(id, options, source) {
119119

120120
/**
121121
* Validates an environment object
122-
* @param {object} environment The environment config object to validate.
122+
* @param {Object} environment The environment config object to validate.
123123
* @param {string} source The location to report with any errors.
124124
* @returns {void}
125125
*/
@@ -152,7 +152,7 @@ function validateEnvironment(environment, source) {
152152

153153
/**
154154
* Validates an entire config object.
155-
* @param {object} config The config object to validate.
155+
* @param {Object} config The config object to validate.
156156
* @param {string} source The location to report with any errors.
157157
* @returns {void}
158158
*/

lib/eslint.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function enableReporting(reportingConfig, start, rulesToEnable) {
305305
* @param {Object} config The existing configuration data.
306306
* @param {Object[]} reportingConfig The existing reporting configuration data.
307307
* @param {Object[]} messages The messages queue.
308-
* @returns {object} Modified config object
308+
* @returns {Object} Modified config object
309309
*/
310310
function modifyConfigsFromComments(filename, ast, config, reportingConfig, messages) {
311311

@@ -484,8 +484,8 @@ function createStubRule(message) {
484484

485485
/**
486486
* Creates a fake rule object
487-
* @param {object} context context object for each rule
488-
* @returns {object} collection of node to listen on
487+
* @param {Object} context context object for each rule
488+
* @returns {Object} collection of node to listen on
489489
*/
490490
function createRuleModule(context) {
491491
return {
@@ -522,7 +522,7 @@ var eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)\*\//g;
522522
/**
523523
* Checks whether or not there is a comment which has "eslint-env *" in a given text.
524524
* @param {string} text - A source code text to check.
525-
* @returns {object|null} A result of parseListConfig() with "eslint-env *" comment.
525+
* @returns {Object|null} A result of parseListConfig() with "eslint-env *" comment.
526526
*/
527527
function findEslintEnv(text) {
528528
var match, retv;
@@ -1146,7 +1146,7 @@ module.exports = (function() {
11461146

11471147
/**
11481148
* Defines many new linting rules.
1149-
* @param {object} rulesToDefine map from unique rule identifier to rule
1149+
* @param {Object} rulesToDefine map from unique rule identifier to rule
11501150
* @returns {void}
11511151
*/
11521152
api.defineRules = function(rulesToDefine) {

0 commit comments

Comments
 (0)