Use Prettier JS (#5017)

* Adds prettier

* Run lint before tests
This commit is contained in:
Florent Vilmart
2018-09-01 13:58:06 -04:00
committed by GitHub
parent 189cd259ee
commit d83a0b6808
240 changed files with 41098 additions and 29020 deletions

View File

@@ -16,10 +16,10 @@ export function loadAdapter<T>(adapter, defaultAdapter, options): T {
}
// Load from the default adapter when no adapter is set
return loadAdapter(defaultAdapter, undefined, options);
} else if (typeof adapter === "function") {
} else if (typeof adapter === 'function') {
try {
return adapter(options);
} catch(e) {
} catch (e) {
if (e.name === 'TypeError') {
var Adapter = adapter;
return new Adapter(options);
@@ -27,7 +27,7 @@ export function loadAdapter<T>(adapter, defaultAdapter, options): T {
throw e;
}
}
} else if (typeof adapter === "string") {
} else if (typeof adapter === 'string') {
/* eslint-disable */
adapter = require(adapter);
// If it's define as a module, get the default