Skip to content

Commit

Permalink
fix: Eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Apr 10, 2024
1 parent 26a0085 commit 8b7b6cd
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions scripts/metadataProvider/createPseudoModulesInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,21 @@ async function transformFiles(sapui5Version: string) {

const {enums} = metadataProvider.getModel();

const groupedEnums = Object.keys(enums).reduce((acc: Record<string, {enum: UI5Enum, export: string}[]>, enumKey: string) => {
const groupedEnums = Object.keys(enums)
.reduce((acc: Record<string, {enum: UI5Enum; export: string}[]>, enumKey: string) => {
// Filter only real pseudo modules i.e. defined within library.js files
if (!pseudoModuleNames[enumKey]) {
return acc;
}
if (!pseudoModuleNames[enumKey]) {
return acc;
}

const curEnum = enums[enumKey];
const curEnum = enums[enumKey];

acc[curEnum.library] = acc[curEnum.library] ?? [];
acc[curEnum.library].push({enum: curEnum, export: pseudoModuleNames[enumKey]});
acc[curEnum.library] = acc[curEnum.library] ?? [];
acc[curEnum.library].push(
{enum: curEnum, export: pseudoModuleNames[enumKey]});

return acc;
}, Object.create(null) as Record<string, {enum: UI5Enum, export: string}[]>);
return acc;
}, Object.create(null) as Record<string, {enum: UI5Enum; export: string}[]>);

await addOverrides(groupedEnums);
}
Expand Down Expand Up @@ -143,7 +145,7 @@ function buildJSDoc(enumEntry: UI5Enum | UI5EnumValue, indent = "") {
return jsDocBuilder.join("\n");
}

async function addOverrides(enums: Record<string, {enum: UI5Enum, export: string}[]>) {
async function addOverrides(enums: Record<string, {enum: UI5Enum; export: string}[]>) {
const indexFilesImports: string[] = [];

for (const libName of Object.keys(enums)) {
Expand Down

0 comments on commit 8b7b6cd

Please sign in to comment.