In PR #16107, we had to wrap our code in IIFE in the scripts folder because the version of eslint we use doesn't support top-level await syntax.
Top-level await support was added in eslint 8 with ecmaVersion: 2022 or higher. We are currently using eslint 7 and ecmaVersion: 2020 and upgrading would require a lot of work that we don't have the capacity for at this time.
In PR #16107, we had to wrap our code in IIFE in the
scripts
folder because the version of eslint we use doesn't support top-level await syntax.Top-level await support was added in eslint 8 with
ecmaVersion: 2022
or higher. We are currently using eslint 7 andecmaVersion: 2020
and upgrading would require a lot of work that we don't have the capacity for at this time.Source: https://eslint.org/blog/2021/06/whats-coming-in-eslint-8.0.0/#support-for-es2022-class-fields%2C-top-level-await%2C-and-regexp-matching-indices