diff --git a/src/builtin/filters/string.ts b/src/builtin/filters/string.ts index 24ee445c9..bdc11d718 100644 --- a/src/builtin/filters/string.ts +++ b/src/builtin/filters/string.ts @@ -25,4 +25,4 @@ export default { if (arr.length >= l) ret += o return ret } -} \ No newline at end of file +} diff --git a/src/context/context.ts b/src/context/context.ts index 651c5a1f1..196776763 100644 --- a/src/context/context.ts +++ b/src/context/context.ts @@ -14,11 +14,11 @@ export default class Context { this.opts = applyDefault(opts) this.environments = ctx } - getRegister(key: string, defaultValue = {}) { - return this.registers[key] = this.registers[key] || defaultValue + getRegister (key: string, defaultValue = {}) { + return (this.registers[key] = this.registers[key] || defaultValue) } - setRegister(key: string, value: any) { - return this.registers[key] = value + setRegister (key: string, value: any) { + return (this.registers[key] = value) } getAll () { return [this.environments, ...this.scopes] diff --git a/src/template/filter/filter-impl-options.ts b/src/template/filter/filter-impl-options.ts index 3690c0ea9..84db8556c 100644 --- a/src/template/filter/filter-impl-options.ts +++ b/src/template/filter/filter-impl-options.ts @@ -1,3 +1,3 @@ -import { FilterImpl } from "./filter-impl"; +import { FilterImpl } from './filter-impl' -export type FilterImplOptions = (this: FilterImpl, value: any, ...args: any[]) => any \ No newline at end of file +export type FilterImplOptions = (this: FilterImpl, value: any, ...args: any[]) => any diff --git a/src/template/filter/filter-impl.ts b/src/template/filter/filter-impl.ts index 257075ff3..314134015 100644 --- a/src/template/filter/filter-impl.ts +++ b/src/template/filter/filter-impl.ts @@ -1,5 +1,5 @@ -import Context from "../../context/context"; +import Context from '../../context/context' export interface FilterImpl { context: Context -} \ No newline at end of file +}