Skip to content

Commit

Permalink
fix: resolve lint errors in lemmyContentAggregatorService
Browse files Browse the repository at this point in the history
  • Loading branch information
diomonogatari committed Oct 17, 2024
1 parent 01a40fd commit 81b636c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"singleQuote": false,
"printWidth": 120
"printWidth": 120,
"trailingComma": "es5"
}
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const checkForNewPosts = async () => {
};

last5MinutesPosts.forEach((post) => {
const title = avoidEmbedInLink(post!.getTitle());
const title = avoidEmbedInLink(post.getTitle());

const message = `Novo post no Lemmy: **${title}** (*${post?.getAuthorName()}*)
Expand Down
6 changes: 4 additions & 2 deletions infrastructure/service/lemmyContentAggregatorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class LemmyContentAggregatorService implements ContentAggregatorS
const response = await fetch(this.feedUrl);

const data = await response.json();

unpinnedPosts = data.posts
.filter((item: any) => !item.post.featured_community && !item.post.featured_local)
.map(
Expand All @@ -24,7 +24,9 @@ export default class LemmyContentAggregatorService implements ContentAggregatorS
createdAt: new Date(item.post.published),
})
);
} catch (e) {}
} catch (e) {
// Ignoring for now.
}

return unpinnedPosts;
}
Expand Down

0 comments on commit 81b636c

Please sign in to comment.