# Disallow member access from await expression πŸ’ΌπŸš« This rule is enabled in the βœ… `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). This rule is _disabled_ in the β˜‘οΈ `unopinionated` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config). πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). 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. ## Examples ```js // ❌ const foo = (await import('./foo.js')).default; // βœ… const {default: foo} = await import('./foo.js'); ``` ```js // ❌ const secondElement = (await getArray())[1]; // βœ… const [, secondElement] = await getArray(); ``` ```js // ❌ const property = (await getObject()).property; // βœ… const {property} = await getObject(); ``` ```js // ❌ const data = await (await fetch('/foo')).json(); // βœ… const response = await fetch('/foo'); const data = await response.json(); ```