style: auto-fix ESLint issues (curly braces and formatting)

- Add curly braces to all if/else/for/while statements
- Fix indentation and trailing spaces
- Auto-fixed 372 linting errors using eslint --fix
- Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
William Valentin
2026-02-11 10:30:24 -08:00
parent 0578a87d85
commit 6090508bad
99 changed files with 418 additions and 418 deletions
+7 -7
View File
@@ -212,7 +212,7 @@ export class GmailWatcher implements ChannelAdapter {
* Calls gmail.users.watch() and schedules renewal before expiry.
*/
private async setupWatch(): Promise<void> {
if (!this.oauth2Client) return;
if (!this.oauth2Client) {return;}
const gmail = google.gmail({ version: 'v1', auth: this.oauth2Client });
@@ -243,7 +243,7 @@ export class GmailWatcher implements ChannelAdapter {
* Fallback mechanism when Pub/Sub push is not available.
*/
private async pollForNewMessages(): Promise<void> {
if (!this.oauth2Client) return;
if (!this.oauth2Client) {return;}
const gmail = google.gmail({ version: 'v1', auth: this.oauth2Client });
@@ -268,7 +268,7 @@ export class GmailWatcher implements ChannelAdapter {
* Updates lastHistoryId to the latest value from the response.
*/
private async processHistoryChanges(startHistoryId: string): Promise<void> {
if (!this.oauth2Client) return;
if (!this.oauth2Client) {return;}
const gmail = google.gmail({ version: 'v1', auth: this.oauth2Client });
@@ -287,17 +287,17 @@ export class GmailWatcher implements ChannelAdapter {
const addedMessages = record.messagesAdded ?? [];
for (const added of addedMessages) {
const messageId = added.message?.id;
if (!messageId || processedIds.has(messageId)) continue;
if (!messageId || processedIds.has(messageId)) {continue;}
processedIds.add(messageId);
const email = await this.getMessageDetails(messageId);
if (!email) continue;
if (!email) {continue;}
// Skip messages before history_start if configured
if (this.config.history_start) {
const emailDate = new Date(email.date);
const startDate = new Date(this.config.history_start);
if (emailDate < startDate) continue;
if (emailDate < startDate) {continue;}
}
const text = this.renderTemplate(email);
@@ -348,7 +348,7 @@ export class GmailWatcher implements ChannelAdapter {
* Fetch full message details by ID and extract relevant headers.
*/
private async getMessageDetails(messageId: string): Promise<EmailInfo | null> {
if (!this.oauth2Client) return null;
if (!this.oauth2Client) {return null;}
const gmail = google.gmail({ version: 'v1', auth: this.oauth2Client });