refactor(editor): Apply Prettier (no-changelog) (#4920)

*  Adjust `format` script

* 🔥 Remove exemption for `editor-ui`

* 🎨 Prettify

* 👕 Fix lint
This commit is contained in:
Iván Ovejero
2022-12-14 10:04:10 +01:00
committed by GitHub
parent bcde07e032
commit 5ca2148c7e
284 changed files with 19247 additions and 15540 deletions

View File

@@ -2,20 +2,25 @@ import { debounce } from 'lodash';
import Vue from 'vue';
export const debounceHelper = Vue.extend({
data () {
data() {
return {
debouncedFunctions: [] as any[], // tslint:disable-line:no-any
};
},
methods: {
async callDebounced (...inputParameters: any[]): Promise<void> { // tslint:disable-line:no-any
// tslint:disable-next-line:no-any
async callDebounced(...inputParameters: any[]): Promise<void> {
const functionName = inputParameters.shift() as string;
const { trailing, debounceTime } = inputParameters.shift();
const { trailing, debounceTime } = inputParameters.shift();
// @ts-ignore
if (this.debouncedFunctions[functionName] === undefined) {
// @ts-ignore
this.debouncedFunctions[functionName] = debounce(this[functionName], debounceTime, trailing ? { trailing } : { leading: true } );
this.debouncedFunctions[functionName] = debounce(
this[functionName],
debounceTime,
trailing ? { trailing } : { leading: true },
);
}
// @ts-ignore
await this.debouncedFunctions[functionName].apply(this, inputParameters);