refactor: Clear unused ESLint directives from BE packages (no-changelog) (#6798)

This commit is contained in:
Iván Ovejero
2023-07-31 11:00:48 +02:00
committed by GitHub
parent 11567f946b
commit 72523462ea
110 changed files with 160 additions and 415 deletions

View File

@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable no-param-reassign */
/* eslint-disable no-underscore-dangle */
import type { IDataObject, IObservableObject } from './Interfaces';
interface IObservableOptions {
@@ -14,14 +13,13 @@ export function create(
option?: IObservableOptions,
depth?: number,
): IDataObject {
// eslint-disable-next-line no-param-reassign, @typescript-eslint/prefer-nullish-coalescing
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
depth = depth || 0;
// Make all the children of target also observable
// eslint-disable-next-line no-restricted-syntax
for (const key in target) {
if (typeof target[key] === 'object' && target[key] !== null) {
// eslint-disable-next-line no-param-reassign
target[key] = create(
target[key] as IDataObject,
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -37,7 +35,6 @@ export function create(
writable: true,
});
return new Proxy(target, {
// eslint-disable-next-line @typescript-eslint/no-shadow
deleteProperty(target, name) {
if (parent === undefined) {
// If no parent is given mark current data as changed
@@ -65,7 +62,6 @@ export function create(
typeof value === 'object' &&
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
Object.keys(value).length === 0
// eslint-disable-next-line no-empty
) {
} else {
(target as IObservableObject).__dataChanged = true;