Makes your code shorter and nicer.
This rule is fixable.
const getObjectProperty = object => object.property;
const removeEmptyValues = object => Object.fromEntries(
Object.entries(object).filter(keyValuePair => Boolean(keyValuePair[1]))
);
const getFoo = ({property}) => property;
const removeEmptyValues = object => Object.fromEntries(
Object.entries(object).filter(([, value]) => Boolean(value))
);
// Used property and index together
function foo(array) {
if (array.length > 0) {
return bar(array[0]);
}
}