Skip to content

Commit

Permalink
fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Nov 29, 2023
1 parent 33b4138 commit a9077ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lib/processors/manifestTransformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getLocale(name) {
* @returns {boolean}
*/
function hasManifestTemplates(manifest) {
const rManifestTemplate = /\{\{([^\}\}]+)\}\}/g;
const rManifestTemplate = /\{\{([^}}]+)\}\}/g;
return JSON.stringify(manifest).match(rManifestTemplate);
}

Expand Down Expand Up @@ -180,7 +180,8 @@ async function transformManifest(resource, fs, options) {
"properties file for defined fallbackLocale or configure another available fallbackLocale");
return;
} else if (!fallbackLocale && !isFallbackLocalePartOfSupportedLocales("en", generatedSupportedLocales)) {
// TO DECIDE: in case no fallbacklocale is defined "en" is used. Should we generate supportedLocales in that case?
// TO DECIDE: in case no fallbacklocale is defined locale "en" is used.
// Should we generate supportedLocales in that case?
log.warn("manifest.json: Generated supported locales ('" + generatedSupportedLocales.join("', '") + "') " +
"do not contain default fallback locale 'en'. Either provide a " +
"properties file for 'en' or configure another available fallbackLocale");
Expand Down
9 changes: 5 additions & 4 deletions lib/tasks/transformManifest.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { getLogger } from "@ui5/logger";
const log = getLogger("builder:tasks:transformManifest");
import manifestTransformer from "../processors/manifestTransformer.js";
import fsInterface from "@ui5/fs/fsInterface";

/* eslint "jsdoc/check-param-names": ["error", {"disableExtraPropertyReporting":true}] */
/**
* Task for transforming the manifest.json file.
*
* @module builder/tasks/transformManifest
* @public
* @function default
* @static
*
* @param {object} parameters Parameters
* @param {@ui5/fs/DuplexCollection} parameters.workspace DuplexCollection to read and write files
* @param {object} parameters.options Options
* @param {string} parameters.options.projectNamespace Namespace of the project
* @param {string} parameters.options.projectNamespace Namespace of the application
* @returns {Promise<undefined>} Promise resolving with <code>undefined</code> once data has been written
*/
export default async function({workspace, options}) {
Expand Down

0 comments on commit a9077ac

Please sign in to comment.