From 3ba489fc096ea54ebbaaf887ba1a488f98e52708 Mon Sep 17 00:00:00 2001 From: "Thibaut(Teebo)" Date: Tue, 29 Oct 2024 14:48:29 +0100 Subject: [PATCH] eslint recommended --- src/Util.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Util.ts b/src/Util.ts index 8dff2d51b..ae5075a5e 100644 --- a/src/Util.ts +++ b/src/Util.ts @@ -260,7 +260,7 @@ export class Transform { } // CONSTANTS -let OBJECT_ARRAY = '[object Array]', +const OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', @@ -423,8 +423,8 @@ let OBJECT_ARRAY = '[object Array]', yellow: [255, 255, 0], yellowgreen: [154, 205, 5], }, - RGB_REGEX = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/, - animQueue: Array = []; + RGB_REGEX = /rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/; + let animQueue: Array = []; const req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) || @@ -904,21 +904,20 @@ export const Util = { return pc; }, _prepareArrayForTween(startArray, endArray, isClosed) { - let n, - start: Vector2d[] = [], + const start: Vector2d[] = [], end: Vector2d[] = []; if (startArray.length > endArray.length) { const temp = endArray; endArray = startArray; startArray = temp; } - for (n = 0; n < startArray.length; n += 2) { + for (let n = 0; n < startArray.length; n += 2) { start.push({ x: startArray[n], y: startArray[n + 1], }); } - for (n = 0; n < endArray.length; n += 2) { + for (let n = 0; n < endArray.length; n += 2) { end.push({ x: endArray[n], y: endArray[n + 1],