diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-16 20:04:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 01:04:56 +0000 |
commit | b249627434d3a94420ac4d98c3ce720767e57b43 (patch) | |
tree | ec46e2c020c5a63a5c2babf56376f53e288ed7f2 /ext/js/templates/sandbox | |
parent | decbc60f7734e739c0e5c41da294f65f9eec92fe (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')
-rw-r--r-- | ext/js/templates/sandbox/anki-template-renderer.js | 6 | ||||
-rw-r--r-- | ext/js/templates/sandbox/template-renderer-media-provider.js | 2 |
2 files changed, 5 insertions, 3 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; diff --git a/ext/js/templates/sandbox/template-renderer-media-provider.js b/ext/js/templates/sandbox/template-renderer-media-provider.js index d8a0a16d..0a7f5d9b 100644 --- a/ext/js/templates/sandbox/template-renderer-media-provider.js +++ b/ext/js/templates/sandbox/template-renderer-media-provider.js @@ -79,7 +79,7 @@ export class TemplateRendererMediaProvider { */ _getFormattedValue(data, namedArgs) { let {value} = data; - const {escape=true} = namedArgs; + const {escape = true} = namedArgs; if (escape) { value = Handlebars.Utils.escapeExpression(value); } |