File tree 2 files changed +5
-10
lines changed
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -252,20 +252,16 @@ const numberKeywords = [
252
252
* https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6
253
253
*/
254
254
function inferTypeByKeyword ( schema ) {
255
- // eslint-disable-next-line
256
- for ( var keyword of objectKeywords ) {
255
+ for ( const keyword of objectKeywords ) {
257
256
if ( keyword in schema ) return 'object'
258
257
}
259
- // eslint-disable-next-line
260
- for ( var keyword of arrayKeywords ) {
258
+ for ( const keyword of arrayKeywords ) {
261
259
if ( keyword in schema ) return 'array'
262
260
}
263
- // eslint-disable-next-line
264
- for ( var keyword of stringKeywords ) {
261
+ for ( const keyword of stringKeywords ) {
265
262
if ( keyword in schema ) return 'string'
266
263
}
267
- // eslint-disable-next-line
268
- for ( var keyword of numberKeywords ) {
264
+ for ( const keyword of numberKeywords ) {
269
265
if ( keyword in schema ) return 'number'
270
266
}
271
267
return schema . type
Original file line number Diff line number Diff line change @@ -102,8 +102,7 @@ module.exports = class Serializer {
102
102
let result = ''
103
103
let last = - 1
104
104
let point = 255
105
- // eslint-disable-next-line
106
- for ( var i = 0 ; i < len ; i ++ ) {
105
+ for ( let i = 0 ; i < len ; i ++ ) {
107
106
point = str . charCodeAt ( i )
108
107
if (
109
108
point === 0x22 || // '"'
You can’t perform that action at this time.
0 commit comments