aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox/anki-template-renderer.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-16 20:04:56 -0500
committerGitHub <noreply@github.com>2023-12-17 01:04:56 +0000
commitb249627434d3a94420ac4d98c3ce720767e57b43 (patch)
treeec46e2c020c5a63a5c2babf56376f53e288ed7f2 /ext/js/templates/sandbox/anki-template-renderer.js
parentdecbc60f7734e739c0e5c41da294f65f9eec92fe (diff)
Update eslint spacing rules (#366)
* Add space-infix-ops rule * Add no-multi-spaces --------- Co-authored-by: Darius Jahandarie <djahandarie@gmail.com>
Diffstat (limited to 'ext/js/templates/sandbox/anki-template-renderer.js')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index dbf395e9..857922bf 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -74,6 +74,7 @@ export class AnkiTemplateRenderer {
* Prepares the data that is necessary before the template renderer can be safely used.
*/
async prepare() {
+ /* eslint-disable no-multi-spaces */
this._templateRenderer.registerHelpers([
['dumpObject', this._dumpObject.bind(this)],
['furigana', this._furigana.bind(this)],
@@ -103,6 +104,7 @@ export class AnkiTemplateRenderer {
['hiragana', this._hiragana.bind(this)],
['katakana', this._katakana.bind(this)]
]);
+ /* eslint-enable no-multi-spaces */
this._templateRenderer.registerDataType('ankiNote', {
modifier: ({marker, commonData}) => this._ankiNoteDataCreator.create(marker, commonData),
composeData: ({marker}, commonData) => ({marker, commonData})
@@ -392,9 +394,9 @@ export class AnkiTemplateRenderer {
case '!=': return operand1 != operand2; // eslint-disable-line eqeqeq
case '===': return operand1 === operand2;
case '!==': return operand1 !== operand2;
- case '<': return operand1 < operand2;
+ case '<': return operand1 < operand2;
case '<=': return operand1 <= operand2;
- case '>': return operand1 > operand2;
+ case '>': return operand1 > operand2;
case '>=': return operand1 >= operand2;
case '<<': return operand1 << operand2;
case '>>': return operand1 >> operand2;