kaltura / moodle_plugin

8 stars 37 forks source link

eslint error: Promise executor functions should not be async no-async-promise-executor #423

Open ctam opened 5 months ago

ctam commented 5 months ago

https://github.com/kaltura/moodle_plugin/blob/286ba5b32724eb525d394c743f745147fc0857bd/lib/editor/tiny/plugins/kalturamedia/amd/src/plugin.js#L33

If a Promise executor function is using await, this is usually a sign that it is not actually necessary to use the new Promise constructor, or the scope of the new Promise constructor can be reduced.

Ref: https://eslint.org/docs/latest/rules/no-async-promise-executor