diff --git a/index.js b/index.js index 862c7c83..2390c28a 100644 --- a/index.js +++ b/index.js @@ -252,20 +252,16 @@ const numberKeywords = [ * https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6 */ function inferTypeByKeyword (schema) { - // eslint-disable-next-line - for (var keyword of objectKeywords) { + for (const keyword of objectKeywords) { if (keyword in schema) return 'object' } - // eslint-disable-next-line - for (var keyword of arrayKeywords) { + for (const keyword of arrayKeywords) { if (keyword in schema) return 'array' } - // eslint-disable-next-line - for (var keyword of stringKeywords) { + for (const keyword of stringKeywords) { if (keyword in schema) return 'string' } - // eslint-disable-next-line - for (var keyword of numberKeywords) { + for (const keyword of numberKeywords) { if (keyword in schema) return 'number' } return schema.type diff --git a/lib/serializer.js b/lib/serializer.js index 1a006d5f..df81960e 100644 --- a/lib/serializer.js +++ b/lib/serializer.js @@ -102,8 +102,7 @@ module.exports = class Serializer { let result = '' let last = -1 let point = 255 - // eslint-disable-next-line - for (var i = 0; i < len; i++) { + for (let i = 0; i < len; i++) { point = str.charCodeAt(i) if ( point === 0x22 || // '"'