mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Add more strict rules (eslint)
This commit is contained in:
parent
b43bb17cdb
commit
52e2698cdf
38 changed files with 488 additions and 434 deletions
|
|
@ -1,12 +1,13 @@
|
|||
|
||||
import {_} from 'common';
|
||||
import _ from '_';
|
||||
import {isFunc, isArray, isUnd} from 'Common/Utils';
|
||||
import {data as GlobalsData} from 'Common/Globals';
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
||||
const SIMPLE_HOOKS = {};
|
||||
const USER_VIEW_MODELS_HOOKS = [];
|
||||
const ADMIN_VIEW_MODELS_HOOKS = [];
|
||||
const
|
||||
SIMPLE_HOOKS = {},
|
||||
USER_VIEW_MODELS_HOOKS = [],
|
||||
ADMIN_VIEW_MODELS_HOOKS = [];
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
|
|
@ -34,7 +35,7 @@ export function runHook(name, args = [])
|
|||
if (isArray(SIMPLE_HOOKS[name]))
|
||||
{
|
||||
_.each(SIMPLE_HOOKS[name], (callback) => {
|
||||
callback.apply(null, args);
|
||||
callback(...args);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue