Eslint plugin async methods
ESLint plugin to prevent mistakes by not awaiting async methods.
Usage
Add @telefonica/eslint-plugin-async-await
to the plugins section of your .eslintrc
configuration file:
plugins:
- '@telefonica/eslint-plugin-async-await'
Then configure the rules:
rules:
- '@telefonica/async-await/await-async-methods': [
error,
{page: ['click', 'screenshot'], screen: ['findByToken']}, # This indicates page.click and page.screenshot are async methods.
] # This indicates screen.findByToken is an async method.