Skip to content

Commit

Permalink
Fix [movex-core-util] Fix linting errors accross the Movex-Core-Util …
Browse files Browse the repository at this point in the history
…library #234
  • Loading branch information
ManikantaMandala committed Oct 15, 2024
1 parent 303c41f commit cdbbce4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion libs/movex-core-util/src/lib/EventEmitter/EventEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { EventMap } from 'typed-emitter';
import type { EmptyFn } from '../core-types';

export const emptyFn: EmptyFn = () => {};
// export const emptyFn: EmptyFn = () => {};

export interface EventEmitter<TEventMap extends EventMap> {
on<E extends keyof TEventMap>(
Expand Down
3 changes: 1 addition & 2 deletions libs/movex-core-util/src/lib/core-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ export type MovexClient<Info extends MovexClientInfo = UnknownRecord> = {
};

export type SanitizedMovexClient<Info extends UnknownRecord = UnknownRecord> =
Pick<MovexClient<Info>, 'id' | 'info'> & {
};
Pick<MovexClient<Info>, 'id' | 'info'> & object;

export type ResourceIdentifierObj<TResourceType extends string> = {
resourceType: TResourceType;
Expand Down
10 changes: 5 additions & 5 deletions libs/movex-core-util/src/lib/md5.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

var k: any = [],
i = 0;
const k: any = [];
let i = 0;

for (; i < 64; ) {
k[i] = 0 | (Math.sin(++i % Math.PI) * 4294967296);
// k[i] = 0 | (Math.abs(Math.sin(++i)) * 4294967296);
}

export function md5(s: any) {
var b,
let b,
c,
d,
h = [(b = 0x67452301), (c = 0xefcdab89), ~b, ~c],
words: number[] = [],
j: any = unescape(encodeURI(s)) + '\x80',
a = j.length;
const words: number[] = [];
const h = [(b = 0x67452301), (c = 0xefcdab89), ~b, ~c];

s = (--a / 4 + 2) | 15;

Expand Down
4 changes: 2 additions & 2 deletions libs/movex-core-util/src/lib/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const isObject = (o: unknown): o is object => {
export const isFunction = (x: unknown): x is (...args: any) => any =>
typeof x === 'function';

export const objectOmit = <O extends Object, ToOmit extends (keyof O)[]>(
export const objectOmit = <O extends object, ToOmit extends (keyof O)[]>(
o: O,
toOmit: ToOmit
) =>
Expand All @@ -37,7 +37,7 @@ export const objectOmit = <O extends Object, ToOmit extends (keyof O)[]>(
};
}, {} as DistributiveOmit<O, TupleToUnionType<ToOmit>>);

export const objectPick = <O extends Object, ToPick extends (keyof O)[]>(
export const objectPick = <O extends object, ToPick extends (keyof O)[]>(
o: O,
toPick: ToPick
) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
invoke,
globalLogsy,
noop,
emptyFn,
type StringKeys,
type GetReducerState,
type BaseMovexDefinitionResourcesMap,
Expand Down Expand Up @@ -84,7 +83,7 @@ export const MovexLocalMasterProvider: React.FC<
};
}

return emptyFn;
return () => {};
}, []);

useEffect(() => {
Expand Down

0 comments on commit cdbbce4

Please sign in to comment.