💼 This rule is enabled in the ✅ recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
When accessing a member from an await expression, the await expression has to be parenthesized, which is not readable.
This rule is fixable for simple member access.
const foo = (await import('./foo.js')).default;
const secondElement = (await getArray())[1];
const property = (await getObject()).property;
const data = await (await fetch('/foo')).json();
const {default: foo} = await import('./foo.js');
const [, secondElement] = await getArray();
const {property} = await getObject();
const response = await fetch('/foo');
const data = await response.json();