Open pdehaan opened 7 years ago
generateTelemetryIdIfNeeded
actually cannot reject the promise, it can only throw: https://github.com/mozilla/shield-studies-addon-utils/blob/master/lib/index.js#L39
As for linting for unhandled promises, I think it's an interesting addition. We stopped using https://github.com/mozilla/eslint-config-normandy/ for some reason, but maybe we should start using that again for these studies, and add the plugin there?
We stopped using eslint-config-normandy when we switched to the airbnb config. It might make sense to roll the recent changes to linting into eslint-config-normandy, and use that everywhere to make linting more similar between projects. We've started to diverge again since we keep overriding airbnb.
Currently not super interesting...
Re: https://github.com/xjamundx/eslint-plugin-promise
And here's my diff (on top of my #46 PR):
... and my ESLint output:
... Where index.js:21 looks like this:
So I guess if
generateTelemetryIdIfNeeded()
could potentially fail or throw an error, we don't catch it in any way. :shrug: