From 22894a45a909e3b000719daebafb0e0204c9c9e1 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Sat, 3 Oct 2020 12:33:19 +0300 Subject: [PATCH] Satisfy lint --- src/tags/yaml-1.1/index.js | 2 +- src/tags/yaml-1.1/omap.js | 1 - src/tags/yaml-1.1/timestamp.js | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tags/yaml-1.1/index.js b/src/tags/yaml-1.1/index.js index 3ea5b4a5..75a6e611 100644 --- a/src/tags/yaml-1.1/index.js +++ b/src/tags/yaml-1.1/index.js @@ -17,7 +17,7 @@ const intIdentify = value => typeof value === 'bigint' || Number.isInteger(value) function intResolve(str, offset, radix) { - let sign = str[0] + const sign = str[0] if (sign === '-' || sign === '+') offset += 1 str = str.substring(offset).replace(/_/g, '') if (intOptions.asBigInt) { diff --git a/src/tags/yaml-1.1/omap.js b/src/tags/yaml-1.1/omap.js index a42c5a7b..cb390569 100644 --- a/src/tags/yaml-1.1/omap.js +++ b/src/tags/yaml-1.1/omap.js @@ -1,4 +1,3 @@ -import { YAMLSemanticError } from '../../errors.js' import { Pair } from '../../ast/Pair.js' import { Scalar } from '../../ast/Scalar.js' import { YAMLMap } from '../../ast/YAMLMap.js' diff --git a/src/tags/yaml-1.1/timestamp.js b/src/tags/yaml-1.1/timestamp.js index 075e29b6..e2c5bfc0 100644 --- a/src/tags/yaml-1.1/timestamp.js +++ b/src/tags/yaml-1.1/timestamp.js @@ -1,3 +1,5 @@ +/* global BigInt */ + import { intOptions } from '../options.js' import { stringifyNumber } from '../../stringify/stringifyNumber.js' @@ -79,7 +81,7 @@ export const timestamp = { ')?$' ), resolve(str) { - let [_, year, month, day, hour, minute, second, millisec, tz] = str.match( + let [, year, month, day, hour, minute, second, millisec, tz] = str.match( timestamp.test ) if (millisec) millisec = (millisec + '00').substr(1, 3)