fix: lint

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 00e299e93e
commit 8e23dec84b

@ -2,7 +2,7 @@
const plugins = require('../plugins');
const utils = require('../utils');
const db = require('./../database');
const db = require('../database');
const batch = require('../batch');
module.exports = function (Groups) {

@ -1,7 +1,7 @@
'use strict';
const user = require('../user');
const db = require('./../database');
const db = require('../database');
module.exports = function (Groups) {
Groups.search = async function (query, options) {

@ -105,7 +105,7 @@ function beforeBuild(targets, callback) {
db.init(next);
},
function (next) {
meta = require('../meta');
meta = require('./index');
meta.themes.setupPaths(next);
},
function (next) {

@ -8,7 +8,7 @@ const util = require('util');
const db = require('../database');
const pubsub = require('../pubsub');
const Meta = require('../meta');
const Meta = require('./index');
const cacheBuster = require('./cacheBuster');
const defaults = require('../../install/data/defaults');

@ -2,7 +2,7 @@
const db = require('../database');
const plugins = require('../plugins');
const Meta = require('../meta');
const Meta = require('./index');
const pubsub = require('../pubsub');
const Settings = module.exports;

@ -15,7 +15,7 @@ const writeFileAsync = util.promisify(fs.writeFile);
const file = require('../file');
const plugins = require('../plugins');
const user = require('../user');
const Meta = require('../meta');
const Meta = require('./index');
const soundsPath = path.join(__dirname, '../../build/public/sounds');
const uploadsPath = path.join(__dirname, '../../public/uploads/sounds');

@ -4,7 +4,7 @@ const nconf = require('nconf');
const winston = require('winston');
const plugins = require('../plugins');
const Meta = require('../meta');
const Meta = require('./index');
const utils = require('../utils');
const Tags = module.exports;

@ -14,7 +14,7 @@ const fsReadfile = util.promisify(fs.readFile);
const file = require('../file');
const db = require('../database');
const Meta = require('../meta');
const Meta = require('./index');
const events = require('../events');
const utils = require('../../public/src/utils');

@ -17,7 +17,7 @@ var analytics = require('../analytics');
var privileges = require('../privileges');
var controllers = {
api: require('./../controllers/api'),
api: require('../controllers/api'),
helpers: require('../controllers/helpers'),
};

@ -6,7 +6,7 @@ const meta = require('../meta');
const user = require('../user');
const events = require('../events');
const db = require('../database');
const websockets = require('../socket.io/index');
const websockets = require('./index');
const index = require('./index');
const getAdminSearchDict = require('../admin/search').getDictionary;

@ -7,7 +7,7 @@ var readline = require('readline');
var winston = require('winston');
var db = require('./database');
var file = require('../src/file');
var file = require('./file');
/*
* Need to write an upgrade script for NodeBB? Cool.

@ -7,7 +7,7 @@ const nconf = require('nconf');
const db = require('../database');
const batch = require('../batch');
const meta = require('../meta');
const user = require('../user');
const user = require('./index');
const topics = require('../topics');
const plugins = require('../plugins');
const emailer = require('../emailer');

@ -3,7 +3,7 @@
var nconf = require('nconf');
var user = require('../user');
var user = require('./index');
var utils = require('../utils');
var plugins = require('../plugins');
var db = require('../database');

@ -4,7 +4,6 @@ var _ = require('lodash');
var validator = require('validator');
var db = require('../database');
var user = require('../user');
var posts = require('../posts');
var topics = require('../topics');
var utils = require('../../public/src/utils');
@ -97,7 +96,7 @@ module.exports = function (User) {
async function formatBanData(bans) {
const banData = await db.getObjects(bans);
const uids = banData.map(banData => banData.fromUid);
const usersData = await user.getUsersFields(uids, ['uid', 'username', 'userslug', 'picture']);
const usersData = await User.getUsersFields(uids, ['uid', 'username', 'userslug', 'picture']);
return banData.map(function (banObj, index) {
banObj.user = usersData[index];
banObj.until = parseInt(banObj.expire, 10);

@ -5,7 +5,7 @@ var async = require('async');
var nconf = require('nconf');
var validator = require('validator');
var db = require('./../database');
var db = require('../database');
var meta = require('../meta');
var emailer = require('../emailer');
var translator = require('../translator');

@ -222,7 +222,7 @@ UserNotifications.sendNameChangeNotification = async function (uid, username) {
};
UserNotifications.pushCount = async function (uid) {
const websockets = require('./../socket.io');
const websockets = require('../socket.io');
const count = await UserNotifications.getUnreadCount(uid);
websockets.in('uid_' + uid).emit('event:notifications.updateCount', count);
};

@ -3,7 +3,7 @@
var nconf = require('nconf');
var winston = require('winston');
var user = require('../user');
var user = require('./index');
var utils = require('../utils');
var batch = require('../batch');

@ -3,7 +3,7 @@
var assert = require('assert');
var JSDOM = require('jsdom').JSDOM;
var utils = require('./../public/src/utils.js');
var utils = require('../public/src/utils.js');
const db = require('./mocks/databasemock');
describe('Utility Methods', function () {

Loading…
Cancel
Save