Disallows quoted keys in object if possible.
Types: Boolean
, String
or Object
Values:
true
for strict mode"allButReserved"
(deprecated use "allExcept": ["reserved"]
)Object
:"allExcept"
array of exceptions:"reserved"
allows ES3+ reserved words to remain quoted
which is helpful when using this option with JSHint's es3
flag."disallowQuotedKeysInObjects": true
true
var x = { a: { default: 1 } };
{"allExcept": ["reserved"]}
var x = {a: 1, 'default': 2};
var x = {'a': 1};