mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
chore: eslint prefer-arrow-callback
This commit is contained in:
committed by
Julian Lam
parent
707b55b6a5
commit
b56d9e12b5
@@ -26,7 +26,7 @@ Upgrade.getAll = async function () {
|
||||
let files = await file.walk(path.join(__dirname, './upgrades'));
|
||||
|
||||
// Sort the upgrade scripts based on version
|
||||
files = files.filter(file => path.basename(file) !== 'TEMPLATE').sort(function (a, b) {
|
||||
files = files.filter(file => path.basename(file) !== 'TEMPLATE').sort((a, b) => {
|
||||
const versionA = path.dirname(a).split(path.sep).pop();
|
||||
const versionB = path.dirname(b).split(path.sep).pop();
|
||||
const semverCompare = semver.compare(versionA, versionB);
|
||||
@@ -66,7 +66,7 @@ Upgrade.appendPluginScripts = async function (files) {
|
||||
try {
|
||||
const pluginConfig = require(configPath);
|
||||
if (pluginConfig.hasOwnProperty('upgrades') && Array.isArray(pluginConfig.upgrades)) {
|
||||
pluginConfig.upgrades.forEach(function (script) {
|
||||
pluginConfig.upgrades.forEach((script) => {
|
||||
files.push(path.join(path.dirname(configPath), script));
|
||||
});
|
||||
}
|
||||
@@ -96,7 +96,7 @@ Upgrade.run = async function () {
|
||||
]);
|
||||
|
||||
let skipped = 0;
|
||||
const queue = available.filter(function (cur) {
|
||||
const queue = available.filter((cur) => {
|
||||
const upgradeRan = completed.includes(path.basename(cur, '.js'));
|
||||
if (upgradeRan) {
|
||||
skipped += 1;
|
||||
|
||||
Reference in New Issue
Block a user