Skip to content

Commit 8230f56

Browse files
authored
Fix: @returns JSDoc annotations for string (#162)
* Fix: @returns JSDoc annotations for string
1 parent 8b47a96 commit 8230f56

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

src/ci_providers/provider_azurepipelines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function _getSlug(inputs) {
8888
* Generates and return the serviceParams object
8989
*
9090
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
91-
* @returns { branch: String, build: String, buildURL: String, commit: String, job: String, pr: String, service: String, slug: String}
91+
* @returns {{ branch: string, build: string, buildURL: string, commit: string, job: string, pr: string, service: string, slug: string }}
9292
*/
9393
function getServiceParams(inputs) {
9494
return {

src/ci_providers/provider_template.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function detect(envs) {
1313
* Determine the build number, based on args and envs
1414
*
1515
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
16-
* @returns String
16+
* @returns {string}
1717
*/
1818
function _getBuild(inputs) {
1919
const { args } = inputs
@@ -24,7 +24,7 @@ function _getBuild(inputs) {
2424
* Determine the build URL for use in the Codecov UI
2525
*
2626
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
27-
* @returns String
27+
* @returns {string}
2828
*/
2929
// eslint-disable-next-line no-unused-vars
3030
function _getBuildURL(inputs) {
@@ -35,7 +35,7 @@ function _getBuildURL(inputs) {
3535
* Determine the branch of the repository, based on args and envs
3636
*
3737
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
38-
* @returns String
38+
* @returns {string}
3939
*/
4040
function _getBranch(inputs) {
4141
const { args } = inputs
@@ -52,7 +52,7 @@ function _getBranch(inputs) {
5252
* Determine the job number, based on args or envs
5353
*
5454
* @param {*} envs an object of enviromental variable key/value pairs
55-
* @returns String
55+
* @returns {string}
5656
*/
5757
// eslint-disable-next-line no-unused-vars
5858
function _getJob(envs) {
@@ -63,7 +63,7 @@ function _getJob(envs) {
6363
* Determine the PR number, based on args and envs
6464
*
6565
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
66-
* @returns String
66+
* @returns {string}
6767
*/
6868
// eslint-disable-next-line no-unused-vars
6969
function _getPR(inputs) {
@@ -80,7 +80,7 @@ function _getPR(inputs) {
8080
/**
8181
* The CI service name that gets sent to the Codecov uploader as part of the query string
8282
*
83-
* @returns String
83+
* @returns {string}
8484
*/
8585
function _getService() {
8686
return ''
@@ -98,7 +98,7 @@ function getServiceName() {
9898
* Determine the commit SHA that is being uploaded, based on args or envs
9999
*
100100
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
101-
* @returns String
101+
* @returns {string}
102102
*/
103103
function _getSHA(inputs) {
104104
const { args } = inputs
@@ -114,7 +114,7 @@ function _getSHA(inputs) {
114114
* Determine the slug (org/repo) based on args or envs
115115
*
116116
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
117-
* @returns String
117+
* @returns {string}
118118
*/
119119
function _getSlug(inputs) {
120120
const { args } = inputs
@@ -128,7 +128,7 @@ function _getSlug(inputs) {
128128
* Generates and return the serviceParams object
129129
*
130130
* @param {args: {}, envs: {}} inputs an object of arguments and enviromental variable key/value pairs
131-
* @returns { branch: String, build: String, buildURL: String, commit: String, job: String, pr: String, service: String, slug: String}
131+
* @returns {{ branch: string, build: string, buildURL: string, commit: string, job: string, pr: string, service: string, slug: string }}
132132
*/
133133
function getServiceParams(inputs) {
134134
return {

src/helpers/files.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { log } = require('./logger')
88
/**
99
*
1010
* @param {string} projectRoot
11-
* @returns Promise<string>
11+
* @returns {Promise<string>}
1212
*/
1313
async function getFileListing(projectRoot, args) {
1414
return getAllFiles(projectRoot, projectRoot, args).join('')
@@ -156,7 +156,7 @@ function coverageFilePatterns() {
156156
*
157157
* @param {string} projectRoot
158158
* @param {string[]} coverageFilePatterns
159-
* @returns string[]
159+
* @returns {string[]}
160160
*/
161161
function getCoverageFiles(projectRoot, coverageFilePatterns) {
162162
return coverageFilePatterns.flatMap(pattern => {
@@ -196,7 +196,7 @@ function fetchGitRoot() {
196196
/**
197197
*
198198
* @param {string} projectRoot
199-
* @returns string[]
199+
* @returns {string[]}
200200
*/
201201
function parseGitIgnore(projectRoot) {
202202
const gitIgnorePath = path.join(projectRoot, '.gitignore')
@@ -250,7 +250,7 @@ function getAllFiles(projectRoot, dirPath, args, arrayOfFiles = []) {
250250
/**
251251
*
252252
* @param {string} filePath
253-
* @returns string[]
253+
* @returns {string[]}
254254
*/
255255
function readAllLines(filePath) {
256256
const fileContents = fs.readFileSync(filePath)
@@ -263,7 +263,7 @@ function readAllLines(filePath) {
263263
*
264264
* @param {string} projectRoot
265265
* @param {string} filePath
266-
* @returns string
266+
* @returns {string}
267267
*/
268268
function readCoverageFile(projectRoot, filePath) {
269269
try {
@@ -295,7 +295,7 @@ function endEnvironmentMarker() {
295295
*
296296
* @param {string} projectRoot
297297
* @param {string} filePath
298-
* @returns string
298+
* @returns {string}
299299
*/
300300
function getFilePath(projectRoot, filePath) {
301301
if (

src/helpers/web.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function uploadToCodecov(uploadURL, token, query, uploadFile, version) {
7979
/**
8080
*
8181
* @param {string} str
82-
* @returns string
82+
* @returns {string}
8383
*/
8484
function camelToSnake(str) {
8585
return (
@@ -96,7 +96,7 @@ function camelToSnake(str) {
9696
/**
9797
*
9898
* @param {Object} queryParams
99-
* @returns string
99+
* @returns {string}
100100
*/
101101
function generateQuery(queryParams) {
102102
const query = Object.entries(queryParams)

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async function main(args) {
219219
/**
220220
*
221221
* @param {string} version
222-
* @returns string
222+
* @returns {string}
223223
*/
224224
function generateHeader(version) {
225225
return `

0 commit comments

Comments
 (0)