Requires member expressions to use dot notation when possible
Types: Boolean
or Object
Values:
true
"except_snake_case"
(deprecated use "allExcept": ["snake_case"]
) allow quoted snake cased identifiersObject
:'allExcept'
array of exceptions:'keywords'
allow quoted identifiers made of reserved words'snake_case'
allow quoted snake cased identifiersN.B.: keywords are always allowed with es3 enabled (http://jscs.info/overview.html#es3)
JSHint: sub
"requireDotNotation": true
var a = b[c];
var a = b.c;
var a = b[c.d];
var a = b[1];
var a = b.while; // reserved words can be property names in ES5
var a = b['c'];
var a = b['snake_cased'];
var a = b['_camelCased'];
var a = b['camelCased_'];
"requireDotNotation": { "allExcept": [ "snake_case" ] }
var a = b[c];
var a = b.c;
var a = b['snake_cased'];
var a = b['camelCased_butWithSnakes'];
"requireDotNotation": { "allExcept": [ "keywords" ] }
var a = b['await']; // reserved word in ES6
var a = b['yield']; // reserved word in ES5
var a = b['let'];
var a = b['c'];
"es3": true
"requireDotNotation": true,
"es3": true
var a = b[c];
var a = b.c;
var a = b[c.d];
var a = b[1];
var a = b['while']; // reserved word in ES3
var a = b['c'];