Extremely fast file change detector and task orchestrator for Node.js.
onTeardown and OnChangeEventHandler requires you to return a Promise. If you have an eventHandler that doesn't need to be async, `@typescript-eslint/require-await` will make it unnecessarily ugly, like wrapping it in a `Promise`, awaiting a noop, disabling the lint rule for one line. ## Expected Behavior This, to be fine ```ts onTeardown: (): void => { if (spawnedOnFirstBuild) { spawnedOnFirstBuild.kill(); } } ``` ## Current Behavior ```ts // Async method 'onTeardown' has no 'await' expression.eslint[@typescript-eslint/require-await](https://typescript-eslint.io/rules/require-await) onTeardown: async (): Promise<void> => { if (spawnedOnFirstBuild) { spawnedOnFirstBuild.kill(); } } ``` ## Possible Solution I suggest changing the return type to `type Awaitable<T> = T | PromiseLike<T>;` if you don't use `.then`s internally
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by AlexAegis and has received 0 comments.