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

@@ -25,9 +25,9 @@ class Subscriber extends events.EventEmitter {
}
subscribe(channel: string): void {
const handler = (message) => {
const handler = message => {
this.emit('message', channel, message);
}
};
this.subscriptions.set(channel, handler);
this.emitter.on(channel, handler);
}
@@ -51,9 +51,7 @@ function createSubscriber(): any {
const EventEmitterPubSub = {
createPublisher,
createSubscriber
}
createSubscriber,
};
export {
EventEmitterPubSub
}
export { EventEmitterPubSub };

View File

@@ -25,7 +25,7 @@ interface Publisher {
* @param {String} channel the channel in which to publish
* @param {String} message the message to publish
*/
publish(channel: string, message: string):void;
publish(channel: string, message: string): void;
}
/**

View File

@@ -1,18 +1,16 @@
import redis from 'redis';
function createPublisher({redisURL}): any {
function createPublisher({ redisURL }): any {
return redis.createClient(redisURL, { no_ready_check: true });
}
function createSubscriber({redisURL}): any {
function createSubscriber({ redisURL }): any {
return redis.createClient(redisURL, { no_ready_check: true });
}
const RedisPubSub = {
createPublisher,
createSubscriber
}
createSubscriber,
};
export {
RedisPubSub
}
export { RedisPubSub };