We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee1347 commit e29df21Copy full SHA for e29df21
src/scripts/crowdin/source-files/fetchAndSaveFileIds.ts
@@ -31,14 +31,12 @@ async function fetchFileIdsForDirectory(
31
return []
32
}
33
34
- return response.data.map(
35
- (item: ResponseObject<SourceFilesModel.File>): FileItem => {
36
- return {
37
- id: item.data.id,
38
- path: item.data.path,
39
- }
40
41
- )
+ return response.data
+ .map((item: ResponseObject<SourceFilesModel.File>): FileItem => ({
+ id: item.data.id,
+ path: item.data.path,
+ }))
+ .filter((file: FileItem) => file.path.endsWith('.md')); // filter out non-md files
42
} catch (error: unknown) {
43
if (error instanceof Error) {
44
console.error(
0 commit comments