Skip to content

Commit

Permalink
Fix ESLint and JSDoc errors
Browse files Browse the repository at this point in the history
And trim some whitespaces
  • Loading branch information
RandomByte committed Mar 11, 2019
1 parent 549e5e2 commit 02198ef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/processors/jsdoc/jsdocGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const jsdocGenerator = async function({sourcePath, targetPath, tmpPath, options}
return Promise.all([
fsTarget.byPath(`/test-resources/${namespace}/designtime/api.json`)
// fsTarget.byPath(`/libraries/${options.projectName}.js`)
]).then((res) => res.filter($=>$));
]).then((res) => res.filter(($)=>$));
};


Expand Down
22 changes: 11 additions & 11 deletions lib/processors/jsdoc/lib/transform-apijson-for-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const log = (function() {

/*
* Transforms the api.json as created by the JSDoc build into a pre-processed api.json file suitable for the SDK.
*
* The pre-processing includes formatting of type references, rewriting of links and other time consuming calculations.
*
*
* The pre-processing includes formatting of type references, rewriting of links and other time consuming calculations.
*
* @param {string} sInputFile Path of the original api.json file that should be transformed
* @param {string} sOutputFile Path that the transformed api.json file should should be written to
* @param {string} sLibraryFile Path to the .library file of the library, used to extract further documentation information
* @param {string|string[]} vDependencyAPIFiles Path of folder that contains api.json files of predecessor libs or
* @param {string|string[]} vDependencyAPIFiles Path of folder that contains api.json files of predecessor libs or
* an array of paths of those files
* @returns {Promise} A Promise that resolves after the transformation has been completed
*/
Expand Down Expand Up @@ -310,7 +310,7 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles)
if (oSymbol.kind === "enum" || oProperty.type === "undefined") {
delete oProperty.type;
}

});
}

Expand Down Expand Up @@ -680,7 +680,7 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles)
if ( Array.isArray(vDependencyAPIFiles) ) {
return oChainObject;
}

// otherwise, it names a directory that has to be scanned for the files
return new Promise(oResolve => {
fs.readdir(vDependencyAPIFiles, function (oError, aItems) {
Expand Down Expand Up @@ -1244,7 +1244,7 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles)
let bSAPHosted = /^https?:\/\/(?:www.)?[\w.]*(?:sap|hana\.ondemand|sapfioritrial)\.com/.test(sTarget);

return `<a target="_blank" href="${sTarget}">${sText}</a>
<img src="./resources/sap/ui/documentation/sdk/images/${bSAPHosted ? 'link-sap' : 'link-external'}.png"
<img src="./resources/sap/ui/documentation/sdk/images/${bSAPHosted ? 'link-sap' : 'link-external'}.png"
title="Information published on ${bSAPHosted ? '' : 'non '}SAP site" class="sapUISDKExternalLink"/>`;
},

Expand Down Expand Up @@ -1375,9 +1375,9 @@ title="Information published on ${bSAPHosted ? '' : 'non '}SAP site" class="sapU
* @param {string} name
* @param {string} type
* @param {string} className
* @param {string=name} text by default if no text is provided the name will be used
* @param {boolean=false} local
* @param {string=""} hrefAppend
* @param {string} [text=name] by default if no text is provided the name will be used
* @param {boolean} [local=false]
* @param {string} [hrefAppend=""]
* @returns {string} link
*/
createLink: function ({name, type, className, text=name, local=false, hrefAppend=""}) {
Expand Down Expand Up @@ -1948,7 +1948,7 @@ title="Information published on ${bSAPHosted ? '' : 'non '}SAP site" class="sapU
inputFile: sInputFile,
outputFile: sOutputFile,
libraryFile: sLibraryFile,
aDependentLibraryFiles: Array.isArray(vDependencyAPIFiles) ? vDependencyAPIFiles : null
aDependentLibraryFiles: Array.isArray(vDependencyAPIFiles) ? vDependencyAPIFiles : null
};

// Start the work here
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"docs/**",
"jsdocs/**",
"coverage/**",
"test/**"
"test/**",
"lib/processors/jsdoc/lib/**"
],
"check-coverage": true,
"statements": 85,
Expand Down

0 comments on commit 02198ef

Please sign in to comment.