From 2a4e1ff734533a026ebf4122c31355e2dffba1b2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 12 Jun 2020 20:08:58 +0300 Subject: style: fix some eslint errors --- index.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'index.ts') diff --git a/index.ts b/index.ts index 6db8929..6458124 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ -import app from './app'; import mongoose from 'mongoose'; import Promise from 'bluebird'; +import app from './app'; mongoose.Promise = Promise; @@ -8,20 +8,16 @@ mongoose.connect('mongodb://localhost:27017/which', { useNewUrlParser: true }); const db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); -db.once('open', function() { +db.once('open', () => { console.log('Connection to MongoDB successful'); }); // Add any new real-time connection to the `everybody` channel -app.on('connection', connection => - app.channel('everybody').join(connection) -); +app.on('connection', connection => app.channel('everybody').join(connection)); // Publish all events to the `everybody` channel app.publish(data => app.channel('everybody')); -const port = 3030 -app.listen(port).on('listening', () => - console.log(`Feathers server listening on localhost:${port}`) -); +const port = 3030; +app.listen(port).on('listening', () => console.log(`Feathers server listening on localhost:${port}`)); -- cgit v1.2.3 From 7e4ebee9a0e56546d6dce76c5c48d6d13371c689 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 12 Jun 2020 20:20:33 +0300 Subject: style: fix all eslint errors --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.ts') diff --git a/index.ts b/index.ts index 6458124..8b01536 100644 --- a/index.ts +++ b/index.ts @@ -15,7 +15,7 @@ db.once('open', () => { // Add any new real-time connection to the `everybody` channel app.on('connection', connection => app.channel('everybody').join(connection)); // Publish all events to the `everybody` channel -app.publish(data => app.channel('everybody')); +app.publish(() => app.channel('everybody')); const port = 3030; -- cgit v1.2.3