mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-13 01:03:35 +02:00
chore: eslint prefer-rest-params, prefer-spread
This commit is contained in:
committed by
Julian Lam
parent
23f212a4c0
commit
115d19e289
@@ -27,8 +27,7 @@ Plugins.data = require('./data');
|
||||
Plugins.hooks = require('./hooks');
|
||||
|
||||
// Backwards compatibility for hooks, remove in v1.18.0
|
||||
const _deprecate = async function () {
|
||||
const args = Array.from(arguments);
|
||||
const _deprecate = async function (...args) {
|
||||
const oldMethod = args.shift();
|
||||
const newMethod = args.shift();
|
||||
const method = args.shift();
|
||||
|
||||
@@ -12,7 +12,7 @@ const { themeNamePattern } = require('../constants');
|
||||
module.exports = function (Plugins) {
|
||||
async function registerPluginAssets(pluginData, fields) {
|
||||
function add(dest, arr) {
|
||||
dest.push.apply(dest, arr || []);
|
||||
dest.push(...(arr || []));
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
|
||||
Reference in New Issue
Block a user