@@ -144,6 +144,10 @@ <h1>JSON Lint</h1>
144
144
< input type ="checkbox " id ="enforce-single-quotes ">
145
145
< label for ="enforce-single-quotes "> Enforce single quotes</ label >
146
146
</ div >
147
+ < div style ="display: none ">
148
+ < input type ="checkbox " id ="trim-trailing-commas ">
149
+ < label for ="trim-trailing-commas "> Trim trailing commas</ label >
150
+ </ div >
147
151
</ div >
148
152
< div >
149
153
< span > Standard:</ span >
@@ -231,8 +235,8 @@ <h2>Result</h2>
231
235
ensureOneSelected ( selected , other )
232
236
var forFormat = [ 'sort-object-keys' ]
233
237
var forPrettyPrint = [
234
- 'prune-comments' , 'strip-object-keys' ,
235
- 'enforce-double -quotes' , 'enforce-single-quotes '
238
+ 'prune-comments' , 'strip-object-keys' , 'enforce-double-quotes' ,
239
+ 'enforce-single -quotes' , 'trim-trailing-commas '
236
240
]
237
241
swapWrapperVisibility ( document . getElementById ( 'pretty-print' ) . checked ,
238
242
forPrettyPrint , forFormat )
@@ -304,7 +308,8 @@ <h2>Result</h2>
304
308
pruneComments : document . getElementById ( 'prune-comments' ) . checked ,
305
309
stripObjectKeys : document . getElementById ( 'strip-object-keys' ) . checked ,
306
310
enforceDoubleQuotes : document . getElementById ( 'enforce-double-quotes' ) . checked ,
307
- enforceSingleQuotes : document . getElementById ( 'enforce-single-quotes' ) . checked
311
+ enforceSingleQuotes : document . getElementById ( 'enforce-single-quotes' ) . checked ,
312
+ trimTrailingCommas : document . getElementById ( 'trim-trailing-commas' ) . checked
308
313
} )
309
314
}
310
315
0 commit comments