Skip to content

Commit

Permalink
Lowercase simple types in JSDoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Sep 24, 2024
1 parent e567631 commit 170d8c9
Show file tree
Hide file tree
Showing 147 changed files with 1,202 additions and 1,202 deletions.
12 changes: 6 additions & 6 deletions packages/ckeditor5-dev-bump-year/lib/bumpyear.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import { globSync } from 'glob';
* With:
* Copyright (c) [initial year]-[current year]
*
* @param {Object} params
* @param {String} params.cwd Current working directory from which all paths will be resolved.
* @param {Array} params.globPatterns An array of objects, where each object has string property `pattern`,
* @param {object} params
* @param {string} params.cwd Current working directory from which all paths will be resolved.
* @param {Array.<string>} params.globPatterns An array of objects, where each object has string property `pattern`,
* and optionally `options` property for this `glob` pattern.
* @param {String} [params.initialYear='2003'] Year from which the licenses should begin.
* @param {string} [params.initialYear='2003'] Year from which the licenses should begin.
*/
export default function bumpYear( params ) {
if ( !params.initialYear ) {
Expand Down Expand Up @@ -95,8 +95,8 @@ export default function bumpYear( params ) {
/**
* License headers are only required in JS and TS files.
*
* @param {String} fileName
* @returns {Boolean}
* @param {string} fileName
* @returns {boolean}
*/
function isLicenseHeaderRequired( fileName ) {
if ( fileName.endsWith( '.js' ) ) {
Expand Down
8 changes: 4 additions & 4 deletions packages/ckeditor5-dev-ci/bin/circle-workflow-notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ async function getOtherJobsData() {
}

/**
* @param {Array.<String>} args
* @returns {Object} result
* @returns {String} result.task
* @returns {Array<String>} result.ignore
* @param {Array.<string>} args
* @returns {object} result
* @returns {string} result.task
* @returns {Array.<string>} result.ignore
*/
function parseArguments( args ) {
const config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

/**
* @param options
* @param {String} options.circleToken
* @param {String} options.githubOrganization
* @param {String} options.githubRepository
* @param {Boolean} options.newValue
* @return {Promise.<Boolean>}
* @param {string} options.circleToken
* @param {string} options.githubOrganization
* @param {string} options.githubRepository
* @param {boolean} options.newValue
* @returns {Promise.<boolean>}
*/
export default async function circleUpdateAutoCancelBuilds( options ) {
const {
Expand Down
62 changes: 31 additions & 31 deletions packages/ckeditor5-dev-ci/lib/format-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import { bots, members } from './data/index.js';
const REPOSITORY_REGEXP = /github\.com\/([^/]+)\/([^/]+)/;

/**
* @param {Object} options
* @param {String} options.slackMessageUsername
* @param {String} options.iconUrl
* @param {String} options.repositoryOwner
* @param {String} options.repositoryName
* @param {String} options.branch
* @param {String} options.buildTitle
* @param {String} options.buildUrl
* @param {String} options.buildId
* @param {String} options.githubToken
* @param {String} options.triggeringCommitUrl
* @param {Number} options.startTime
* @param {Number} options.endTime
* @param {Boolean} options.shouldHideAuthor
* @param {object} options
* @param {string} options.slackMessageUsername
* @param {string} options.iconUrl
* @param {string} options.repositoryOwner
* @param {string} options.repositoryName
* @param {string} options.branch
* @param {string} options.buildTitle
* @param {string} options.buildUrl
* @param {string} options.buildId
* @param {string} options.githubToken
* @param {string} options.triggeringCommitUrl
* @param {number} options.startTime
* @param {number} options.endTime
* @param {boolean} options.shouldHideAuthor
*/
export default async function formatMessage( options ) {
const commitDetails = await getCommitDetails( options.triggeringCommitUrl, options.githubToken );
Expand Down Expand Up @@ -64,11 +64,11 @@ export default async function formatMessage( options ) {
/**
* Returns the additional message that will be added to the notifier post.
*
* @param {Object} options
* @param {Boolean} options.shouldHideAuthor
* @param {String|null} options.githubAccount
* @param {String} options.commitAuthor
* @returns {String}
* @param {object} options
* @param {boolean} options.shouldHideAuthor
* @param {string|null} options.githubAccount
* @param {string} options.commitAuthor
* @returns {string}
*/
function getNotifierMessage( options ) {
if ( options.shouldHideAuthor ) {
Expand All @@ -95,8 +95,8 @@ function getNotifierMessage( options ) {
}

/**
* @param {String|null} githubAccount
* @returns {String|null}
* @param {string|null} githubAccount
* @returns {string|null}
*/
function findSlackAccount( githubAccount ) {
if ( !githubAccount ) {
Expand All @@ -116,9 +116,9 @@ function findSlackAccount( githubAccount ) {
* Returns string representing amount of time passed between two timestamps.
* Timestamps should be in seconds instead of milliseconds.
*
* @param {Number} startTime
* @param {Number} endTime
* @returns {String}
* @param {number} startTime
* @param {number} endTime
* @returns {string}
*/
function getExecutionTime( startTime, endTime ) {
if ( !startTime || !endTime ) {
Expand Down Expand Up @@ -155,8 +155,8 @@ function getExecutionTime( startTime, endTime ) {
/**
* Replaces `#Id` and `Repo/Owner#Id` with URls to Github Issues.
*
* @param {String} commitMessage
* @param {String} triggeringCommitUrl
* @param {string} commitMessage
* @param {string} triggeringCommitUrl
* @returns {string}
*/
function getFormattedMessage( commitMessage, triggeringCommitUrl ) {
Expand All @@ -178,9 +178,9 @@ function getFormattedMessage( commitMessage, triggeringCommitUrl ) {
/**
* Returns a promise that resolves the commit details (author and message) based on the specified GitHub URL.
*
* @param {String} triggeringCommitUrl The URL to the commit on GitHub.
* @param {String} githubToken Github token used for authorization a request,
* @returns {Promise.<Object>}
* @param {string} triggeringCommitUrl The URL to the commit on GitHub.
* @param {string} githubToken Github token used for authorization a request,
* @returns {Promise.<object>}
*/
function getCommitDetails( triggeringCommitUrl, githubToken ) {
const apiGithubUrlCommit = getGithubApiUrl( triggeringCommitUrl );
Expand All @@ -205,8 +205,8 @@ function getCommitDetails( triggeringCommitUrl, githubToken ) {
/**
* Returns a URL to GitHub API which returns details of the commit that caused the CI to fail its job.
*
* @param {String} triggeringCommitUrl The URL to the commit on GitHub.
* @returns {String}
* @param {string} triggeringCommitUrl The URL to the commit on GitHub.
* @returns {string}
*/
function getGithubApiUrl( triggeringCommitUrl ) {
return triggeringCommitUrl.replace( 'github.com/', 'api.github.com/repos/' ).replace( '/commit/', '/commits/' );
Expand Down
14 changes: 7 additions & 7 deletions packages/ckeditor5-dev-ci/lib/is-job-triggered-by-member.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import getJobApprover from './utils/get-job-approver.js';

/**
* @param options
* @param {String} options.circleToken
* @param {String} options.circleWorkflowId
* @param {String} options.circleApprovalJobName
* @param {String} options.githubOrganization
* @param {String} options.githubTeamSlug
* @param {String} options.githubToken
* @return {Promise.<Boolean>}
* @param {string} options.circleToken
* @param {string} options.circleWorkflowId
* @param {string} options.circleApprovalJobName
* @param {string} options.githubOrganization
* @param {string} options.githubTeamSlug
* @param {string} options.githubToken
* @returns {Promise.<boolean>}
*/
export default async function isJobTriggeredByMember( options ) {
const {
Expand Down
8 changes: 4 additions & 4 deletions packages/ckeditor5-dev-ci/lib/process-job-statuses.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function processJobStatuses( jobs ) {

/**
* @param {WorkflowJob} job
* @returns {Boolean}
* @returns {boolean}
*/
function isJobFailed( job ) {
if ( job.status === 'failed' ) {
Expand All @@ -81,11 +81,11 @@ function clone( obj ) {
}

/**
* @typedef {Object} WorkflowJob
* @typedef {object} WorkflowJob
*
* @property {String} id
* @property {string} id
*
* @property {'blocked'|'running'|'failed'|'failed_parent'|'success'} status
*
* @property {Array.<String>} dependencies
* @property {Array.<string>} dependencies
*/
14 changes: 7 additions & 7 deletions packages/ckeditor5-dev-ci/lib/trigger-circle-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

/**
* @param options
* @param {String} options.circleToken
* @param {String} options.commit
* @param {String} options.branch
* @param {String} options.repositorySlug A repository slug (org/name) where a new build will be started.
* @param {String|null} [options.releaseBranch=null] Define a branch that leads the release process.
* @param {String|null} [options.triggerRepositorySlug=null] A repository slug (org/name) that triggers a new build.
* @return {Promise}
* @param {string} options.circleToken
* @param {string} options.commit
* @param {string} options.branch
* @param {string} options.repositorySlug A repository slug (org/name) where a new build will be started.
* @param {string|null} [options.releaseBranch=null] Define a branch that leads the release process.
* @param {string|null} [options.triggerRepositorySlug=null] A repository slug (org/name) that triggers a new build.
* @returns {Promise}
*/
export default async function triggerCircleBuild( options ) {
const {
Expand Down
8 changes: 4 additions & 4 deletions packages/ckeditor5-dev-ci/lib/utils/get-job-approver.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
/**
* Returns a promise that resolves to GitHub name of a developer who approved the `jobName` job.
*
* @param {String} circleCiToken
* @param {String} workflowId
* @param {String} jobName
* @returns {Promise.<String>}
* @param {string} circleCiToken
* @param {string} workflowId
* @param {string} jobName
* @returns {Promise.<string>}
*/
export default async function getJobApprover( circleCiToken, workflowId, jobName ) {
const circleRequestOptions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ checkDependencies( packagePaths, options )
/**
* Parses CLI arguments and options.
*
* @param {Array.<String>} args CLI arguments containing package paths and options.
* @returns {Object} result
* @returns {Set.<String>} result.packagePaths Relative package paths.
* @returns {Object.<String, Boolean>} result.options Configuration options.
* @param {Array.<string>} args CLI arguments containing package paths and options.
* @returns {object} result
* @returns {Set.<string>} result.packagePaths Relative package paths.
* @returns {Object.<string, Boolean>} result.options Configuration options.
*/
function parseArguments( args ) {
const config = {
Expand Down Expand Up @@ -56,8 +56,8 @@ function parseArguments( args ) {
* Returns relative (to the current work directory) paths to packages. If the provided `args` array is empty,
* the packages will be read from the `packages/` directory.
*
* @param {Array.<String>} args CLI arguments with relative or absolute package paths.
* @returns {Set.<String>} Relative package paths.
* @param {Array.<string>} args CLI arguments with relative or absolute package paths.
* @returns {Set.<string>} Relative package paths.
*/
function getPackagePaths( args ) {
if ( !args.length ) {
Expand Down
Loading

0 comments on commit 170d8c9

Please sign in to comment.