Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 6600cd5

Browse files
committed
fixed linter
1 parent 321a8ae commit 6600cd5

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

packages/react/src/hocs/AgileHOC.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import Agile, {
88
flatMerge,
99
extractRelevantObservers,
1010
normalizeArray,
11-
LogCodeManager,
1211
} from '@agile-ts/core';
13-
import type { Collection } from '@agile-ts/core'; // Only import Collection and Group type for better Treeshaking
12+
import type { Collection } from '@agile-ts/core';
13+
import { LogCodeManager } from '../logCodeManager'; // Only import Collection and Group type for better Treeshaking
1414

1515
/**
1616
* A Higher order Component for binding the most relevant value of multiple Agile Instances
@@ -57,10 +57,7 @@ export function AgileHOC(
5757
}
5858
}
5959
if (!agileInstance || !agileInstance.subController) {
60-
LogCodeManager.getLogger()?.error(
61-
'Failed to subscribe Component with deps',
62-
deps
63-
);
60+
LogCodeManager.log('32:03:00', [deps]);
6461
return reactComponent;
6562
}
6663

@@ -93,9 +90,8 @@ const createHOC = (
9390
public agileInstance: Agile;
9491
public waitForMount: boolean;
9592

96-
public componentSubscriptionContainers: Array<
97-
ComponentSubscriptionContainer
98-
> = []; // Represents all Subscription Container subscribed to this Component (set by subController)
93+
public componentSubscriptionContainers: Array<ComponentSubscriptionContainer> =
94+
[]; // Represents all Subscription Container subscribed to this Component (set by subController)
9995
public agileProps = {}; // Props of subscribed Agile Instances (are merged into the normal props)
10096

10197
constructor(props: any) {
@@ -235,9 +231,8 @@ const formatDepsWithIndicator = (
235231
export class AgileReactComponent extends React.Component {
236232
// @ts-ignore
237233
public agileInstance: Agile;
238-
public componentSubscriptionContainers: Array<
239-
ComponentSubscriptionContainer
240-
> = [];
234+
public componentSubscriptionContainers: Array<ComponentSubscriptionContainer> =
235+
[];
241236
public agileProps = {};
242237

243238
constructor(props: any) {

packages/react/src/logCodeManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const additionalLogs = {
88
'Failed to subscribe Component with deps because of missing valid Agile Instance.',
99
'31:03:00':
1010
"In order to use the Agile proxy functionality, the installation of an additional package called '@agile-ts/proxytree' is required!",
11+
'32:03:00': 'Failed to subscribe Component with deps',
1112
};
1213

1314
/**

packages/utils/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ export function notEqual(value1: any, value2: any): boolean {
237237
* @param characters - Characters to generate the id from (default = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789').
238238
*/
239239
export function generateId(
240-
length: number = 5,
241-
characters: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
240+
length = 5,
241+
characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
242242
): string {
243243
const charactersLength = characters.length;
244244
let result = '';

0 commit comments

Comments
 (0)