2020-08-31 16:19:15 +02:00
|
|
|
|
|
|
|
# Code-style
|
|
|
|
|
|
|
|
- methods that return a promise should always use async/await
|
|
|
|
otherwise synchronous errors can get swallowed
|
2020-11-20 16:39:16 +01:00
|
|
|
you can return a promise without awaiting it though.
|
2020-08-31 16:19:15 +02:00
|
|
|
- only named exports, no default exports
|
|
|
|
otherwise it becomes hard to remember what was a default/named export
|
2020-09-03 11:28:27 +02:00
|
|
|
- should we return promises from storage mutation calls? probably not, as we don't await them anywhere. only read calls should return promises?
|
2020-11-20 16:39:16 +01:00
|
|
|
- we don't anymore
|
2021-12-08 18:00:27 +01:00
|
|
|
- don't use these features, as they are not widely enough supported.
|
|
|
|
- [lookbehind in regular expressions](https://caniuse.com/js-regexp-lookbehind)
|