[js] Run prettier for the first time

This commit is contained in:
Chris Bianca
2018-01-25 18:25:39 +00:00
parent 8feffd85c5
commit fba6380729
124 changed files with 4343 additions and 2633 deletions

View File

@@ -5,7 +5,7 @@ import { windowOrGlobal } from './';
import type ModuleBase from './ModuleBase';
((base) => {
(base => {
window = base || window;
// $FlowFixMe: Why are we using localStorage at all?
if (!window.localStorage) window.localStorage = {};
@@ -15,7 +15,8 @@ import type ModuleBase from './ModuleBase';
const NATIVE_LOGGERS: { [string]: Object } = {};
const getModuleKey = (module: ModuleBase): string => `${module.app.name}:${module.namespace}`;
const getModuleKey = (module: ModuleBase): string =>
`${module.app.name}:${module.namespace}`;
export const getLogger = (module: ModuleBase) => {
const key = getModuleKey(module);
@@ -25,12 +26,14 @@ export const getLogger = (module: ModuleBase) => {
export const initialiseLogger = (module: ModuleBase, logNamespace: string) => {
const key = getModuleKey(module);
if (!NATIVE_LOGGERS[key]) {
// eslint-disable-next-line global-require
NATIVE_LOGGERS[key] = require('bows')(`🔥 ${logNamespace.toUpperCase()}`);
}
};
export default class Log {
static createLogger(namespace: string) {
// eslint-disable-next-line global-require
return require('bows')(namespace);
}