Skip to content

es-x/no-promise-withresolvers ​

disallow the Promise.withResolvers() method

This rule reports ES2024 Promise.withResolvers function as errors.

💡 Examples ​

â›” Examples of incorrect code for this rule:

Now loading...

🔧 Options ​

This rule has an option.

jsonc
{
  "rules": {
    "es-x/no-promise-withresolvers": [
      "error",
      {
        "allowTestedProperty": false
      }
    ]
  }
}

allowTestedProperty: boolean ​

Configure the allowTestedProperty mode for only this rule. This is prior to the settings['es-x'].allowTestedProperty setting.

🚀 Version ​

This rule was introduced in v7.5.0.

📚 References ​