mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
docs(best practices): create section for async functions (#16574)
This commit is contained in:
parent
6ae4a55bd3
commit
badccaff89
1 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,11 @@ try {
|
|||
}
|
||||
```
|
||||
|
||||
### Aysnc functions
|
||||
|
||||
Never use `Promise.resolve` in async functions.
|
||||
Never use `Promise.reject` in async functions, instead throw an `Error` class type.
|
||||
|
||||
### Dates and times
|
||||
|
||||
Use [`Luxon`](https://www.npmjs.com/package/luxon) to handle dates and times.
|
||||
|
|
Loading…
Reference in a new issue