mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
chore: fix linting
This commit is contained in:
+1
-2
@@ -1,5 +1,4 @@
|
||||
import * as _ from './underscore'
|
||||
import { __extends } from 'tslib'
|
||||
import Token from 'src/parser/token'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
|
||||
@@ -11,7 +10,7 @@ abstract class LiquidError extends Error {
|
||||
this.originalError = err
|
||||
this.token = token
|
||||
}
|
||||
protected update() {
|
||||
protected update () {
|
||||
const err = this.originalError
|
||||
const context = mkContext(this.token)
|
||||
this.message = mkMessage(err.message, this.token)
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
* The iteratee is invoked with three arguments: (value, index, iterable).
|
||||
*/
|
||||
export function mapSeries<T1, T2> (
|
||||
iterable: T1[],
|
||||
iteratee: (item: T1, idx: number, iterable: T1[]) => Promise<T2> | T2
|
||||
iterable: T1[],
|
||||
iteratee: (item: T1, idx: number, iterable: T1[]) => Promise<T2> | T2
|
||||
): Promise<T2[]> {
|
||||
let ret = Promise.resolve(0)
|
||||
const result: T2[] = []
|
||||
|
||||
@@ -179,6 +179,6 @@ export default function (d: Date, format: string) {
|
||||
// Add the format code
|
||||
const ch = results[0].charAt(1)
|
||||
const func = formatCodes[ch]
|
||||
output += func ? func.call(null, d) : '%' + ch
|
||||
output += func ? func(d) : '%' + ch
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@ export function isError (value: any): boolean {
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @return {Object} Returns object.
|
||||
*/
|
||||
export function forOwn <T>(
|
||||
export function forOwn <T> (
|
||||
object: {[key: string]: T} | undefined,
|
||||
iteratee: ((val: T, key: string, obj: {[key: string]: T}) => boolean | void)
|
||||
) {
|
||||
) {
|
||||
object = object || {}
|
||||
for (const k in object) {
|
||||
if (object.hasOwnProperty(k)) {
|
||||
|
||||
Reference in New Issue
Block a user