From 76ca08bd59f0e8bfa1bb20ac813f48e7ab241265 Mon Sep 17 00:00:00 2001 From: James Maa Date: Fri, 31 May 2024 08:06:52 -0700 Subject: Allow trailing commas in ESLint (#1013) * Update comma-dangle rule * Fix dangling commas --- ext/js/templates/anki-template-renderer.js | 10 +++++----- ext/js/templates/template-renderer-frame-api.js | 2 +- ext/js/templates/template-renderer-media-provider.js | 4 ++-- ext/js/templates/template-renderer-proxy.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/js/templates') diff --git a/ext/js/templates/anki-template-renderer.js b/ext/js/templates/anki-template-renderer.js index 888be9b0..d526a1d1 100644 --- a/ext/js/templates/anki-template-renderer.js +++ b/ext/js/templates/anki-template-renderer.js @@ -96,20 +96,20 @@ export class AnkiTemplateRenderer { ['getMedia', this._getMedia.bind(this)], ['pronunciation', this._pronunciation.bind(this)], ['hiragana', this._hiragana.bind(this)], - ['katakana', this._katakana.bind(this)] + ['katakana', this._katakana.bind(this)], ]); /* eslint-enable @stylistic/no-multi-spaces */ this._templateRenderer.registerDataType('ankiNote', { modifier: ({marker, commonData}) => createAnkiNoteData(marker, commonData), - composeData: ({marker}, commonData) => ({marker, commonData}) + composeData: ({marker}, commonData) => ({marker, commonData}), }); this._templateRenderer.setRenderCallbacks( this._onRenderSetup.bind(this), - this._onRenderCleanup.bind(this) + this._onRenderCleanup.bind(this), ); await Promise.all([ this._structuredContentStyleApplier.prepare(), - this._pronunciationStyleApplier.prepare() + this._pronunciationStyleApplier.prepare(), ]); } @@ -201,7 +201,7 @@ export class AnkiTemplateRenderer { } return { expression: typeof expression === 'string' ? expression : '', - reading: typeof reading === 'string' ? reading : '' + reading: typeof reading === 'string' ? reading : '', }; } diff --git a/ext/js/templates/template-renderer-frame-api.js b/ext/js/templates/template-renderer-frame-api.js index cd9b4232..8a8b319e 100644 --- a/ext/js/templates/template-renderer-frame-api.js +++ b/ext/js/templates/template-renderer-frame-api.js @@ -30,7 +30,7 @@ export class TemplateRendererFrameApi { this._windowMessageHandlers = createApiMap([ ['render', this._onRender.bind(this)], ['renderMulti', this._onRenderMulti.bind(this)], - ['getModifiedData', this._onGetModifiedData.bind(this)] + ['getModifiedData', this._onGetModifiedData.bind(this)], ]); } diff --git a/ext/js/templates/template-renderer-media-provider.js b/ext/js/templates/template-renderer-media-provider.js index c4b07369..28b9c7f3 100644 --- a/ext/js/templates/template-renderer-media-provider.js +++ b/ext/js/templates/template-renderer-media-provider.js @@ -146,7 +146,7 @@ export class TemplateRendererMediaProvider { this._addRequirement({ type: 'dictionaryMedia', dictionary, - path + path, }); return null; } @@ -170,7 +170,7 @@ export class TemplateRendererMediaProvider { this._addRequirement({ type: 'textFurigana', text, - readingMode + readingMode, }); return null; } diff --git a/ext/js/templates/template-renderer-proxy.js b/ext/js/templates/template-renderer-proxy.js index c1f5a5bf..a109f277 100644 --- a/ext/js/templates/template-renderer-proxy.js +++ b/ext/js/templates/template-renderer-proxy.js @@ -179,7 +179,7 @@ export class TemplateRendererProxy { cancel: () => { cleanup(); reject(new Error('Terminated')); - } + }, }; const cleanup = () => { -- cgit v1.2.3