Skip to content

Commit 2df7d3e

Browse files
mitermayertmcw
authored andcommitted
style: Making return type params consistent with the rest of the code base (#894)
1 parent b486988 commit 2df7d3e

File tree

14 files changed

+19
-19
lines changed

14 files changed

+19
-19
lines changed

src/commands/readme.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports.builder = {
4949
* Insert API documentation into a Markdown readme
5050
* @private
5151
* @param {Object} argv args from the CLI option parser
52-
* @return {undefined} has the side-effect of writing a file or printing to stdout
52+
* @returns {undefined} has the side-effect of writing a file or printing to stdout
5353
*/
5454
module.exports.handler = function readme(argv: Object) {
5555
argv._handled = true;

src/default_theme/assets/anchor.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
/**
5050
* Checks to see if this device supports touch. Uses criteria pulled from Modernizr:
5151
* https://github.com/Modernizr/Modernizr/blob/da22eb27631fc4957f67607fe6042e85c0a84656/feature-detects/touchevents.js#L40
52-
* @return {Boolean} - true if the current device supports touch.
52+
* @returns {Boolean} - true if the current device supports touch.
5353
*/
5454
this.isTouchDevice = function() {
5555
return !!(
@@ -62,7 +62,7 @@
6262
* Add anchor links to page elements.
6363
* @param {String|Array|Nodelist} selector - A CSS selector for targeting the elements you wish to add anchor links
6464
* to. Also accepts an array or nodeList containing the relavant elements.
65-
* @return {this} - The AnchorJS object
65+
* @returns {this} - The AnchorJS object
6666
*/
6767
this.add = function(selector) {
6868
var elements,
@@ -191,7 +191,7 @@
191191
* Removes all anchorjs-links from elements targed by the selector.
192192
* @param {String|Array|Nodelist} selector - A CSS selector string targeting elements with anchor links,
193193
* OR a nodeList / array containing the DOM elements.
194-
* @return {this} - The AnchorJS object
194+
* @returns {this} - The AnchorJS object
195195
*/
196196
this.remove = function(selector) {
197197
var index,
@@ -227,7 +227,7 @@
227227
* remove extra hyphens, truncate, trim hyphens, and make lowercase.
228228
*
229229
* @param {String} text - Any text. Usually pulled from the webpage element we are linking to.
230-
* @return {String} - hyphen-delimited text for use in IDs and URLs.
230+
* @returns {String} - hyphen-delimited text for use in IDs and URLs.
231231
*/
232232
this.urlify = function(text) {
233233
// Regex for finding the nonsafe URL characters (many need escaping): & +$,:;=?@"#{}|^~[`%!'<>]./()*\
@@ -258,7 +258,7 @@
258258
* Determines if this element already has an AnchorJS link on it.
259259
* Uses this technique: http://stackoverflow.com/a/5898748/1154642
260260
* @param {HTMLElemnt} el - a DOM node
261-
* @return {Boolean} true/false
261+
* @returns {Boolean} true/false
262262
*/
263263
this.hasAnchorJSLink = function(el) {
264264
var hasLeftAnchor =
@@ -276,7 +276,7 @@
276276
* It also throws errors on any other inputs. Used to handle inputs to .add and .remove.
277277
* @param {String|Array|Nodelist} input - A CSS selector string targeting elements with anchor links,
278278
* OR a nodeList / array containing the DOM elements.
279-
* @return {Array} - An array containing the elements we want.
279+
* @returns {Array} - An array containing the elements we want.
280280
*/
281281
function _getElements(input) {
282282
var elements;

src/extractors/comments.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function walkComments(
3535
* Parse a comment with doctrine and decorate the result with file position and code context.
3636
*
3737
* @param {Object} comment the current state of the parsed JSDoc comment
38-
* @return {undefined} this emits data
38+
* @returns {undefined} this emits data
3939
*/
4040
function parseComment(comment) {
4141
newResults.push(

src/filter_access.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { walk } from './walk';
99
*
1010
* @param {Array<string>} [levels=['public', 'undefined', 'protected']] included access levels.
1111
* @param {Array<Object>} comments parsed comments (can be nested)
12-
* @return {Array<Object>} filtered comments
12+
* @returns {Array<Object>} filtered comments
1313
*/
1414
function filterAccess(levels: Array<string>, comments: Array<Comment>) {
1515
function filter(comment) {

src/github.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var getGithubURLPrefix = require('./git/url_prefix');
99
*
1010
* @name linkGitHub
1111
* @param {Object} comment parsed comment
12-
* @return {Object} comment with github inferred
12+
* @returns {Object} comment with github inferred
1313
*/
1414
module.exports = function(comment: Comment) {
1515
var repoPath = findGit(comment.context.file);

src/input/shallow.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var smartGlob = require('../smart_glob.js');
1616
*
1717
* @param indexes entry points
1818
* @param config parsing options
19-
* @return promise with parsed files
19+
* @returns promise with parsed files
2020
*/
2121
module.exports = function(
2222
indexes: Array<string | Object>,

src/is_jsdoc_comment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @name isJSDocComment
1212
* @param {Object} comment an ast path of the comment
13-
* @return {boolean} whether it is valid
13+
* @returns {boolean} whether it is valid
1414
*/
1515
module.exports = function isJSDocComment(
1616
comment /*: {

src/lint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function lintComments(comment: Comment) {
6767
* @private
6868
* Extract lint instructions from comments and generate user-readable output.
6969
* @param {Array<Object>} comments a list of comments
70-
* @return {string} user-readable output
70+
* @returns {string} user-readable output
7171
*/
7272
function formatLint(comments: Array<Comment>): string {
7373
var vFiles = {};

src/module_filters.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
* @param {Object} options - An options object with `external` being a
2626
* micromatch-compaitible glob. *NOTE:* the glob will be matched relative to
2727
* the top-level node_modules directory for each entry point.
28-
* @return {function} - A function for use as the module-deps `postFilter`
28+
* @returns {function} - A function for use as the module-deps `postFilter`
2929
* options.
3030
*/
3131
externals: function externalModuleFilter(

src/nest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ var nestTag = (
9595
* This assumes that incoming comments have been flattened.
9696
*
9797
* @param {Object} comment input comment
98-
* @return {Object} nested comment
98+
* @returns {Object} nested comment
9999
*/
100100
var nest = (comment: Comment) =>
101101
Object.assign(comment, {

src/output/markdown.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var remark = require('remark'),
1010
* @param {Array<Object>} comments parsed comments
1111
* @param {Object} args Options that can customize the output
1212
* @name formats.markdown
13-
* @return {Promise<string>} a promise of the eventual value
13+
* @returns {Promise<string>} a promise of the eventual value
1414
* @public
1515
* @example
1616
* var documentation = require('documentation');

src/parse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ function flattenKindShorthand(result, tag, key) {
564564
* @param {string} comment input to be parsed
565565
* @param {Object} loc location of the input
566566
* @param {Object} context code context of the input
567-
* @return {Comment} an object conforming to the
567+
* @returns {Comment} an object conforming to the
568568
* [documentation schema](https://github.com/documentationjs/api-json)
569569
*/
570570
function parseJSDoc(comment: string, loc: ?Object, context: ?Object): Comment {

src/parsers/javascript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function leftPad(str, width) {
3232
*
3333
* @param {Object} data a chunk of data provided by module-deps
3434
* @param {Object} config config
35-
* @return {Array<Object>} an array of parsed comments
35+
* @returns {Array<Object>} an array of parsed comments
3636
*/
3737
function parseJavaScript(data: Object, config: DocumentationConfig) {
3838
var visited = new Set();

src/sort.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var fs = require('fs');
1111
*
1212
* @param {Array<Object>} comments all comments
1313
* @param {Object} options options from documentation.yml
14-
* @return {number} sorting value
14+
* @returns {number} sorting value
1515
* @private
1616
*/
1717
module.exports = function sortDocs(comments: Array<Comment>, options: Object) {

0 commit comments

Comments
 (0)