← Back

dot-notation warning

Forces using dot notation exclusively for getting object properties.

Examples

❌  Incorrect

const a = foo['bar'];

✅  Correct

const a = foo.bar;

const b = 'Hello';
const c = foo[b];