1.1.1 ā€¢ Published 2 years ago

@putout/plugin-apply-await-import v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@putout/plugin-apply-await-import NPM version

šŸŠPutout plugin adds ability to add forgotten await to dynamic import(). Part of @putout/plugin-promises.

Install

npm i @putout/plugin-apply-await-import

Rule

{
    "rules": {
        "apply-await-import": "on"
    }
}

āŒ Example of incorrect code

const {readFile} = import('fs/promises');

āœ… Example of correct code

const {readFile} = await import('fs/promises');

License

MIT