1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix linting

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2023-03-03 09:20:16 +02:00
parent 9414626c66
commit 92ddb33467
2 changed files with 37 additions and 38 deletions

View File

@ -63,14 +63,14 @@ describe("emit-telemetry-from-specific-function-calls", () => {
di.register( di.register(
whiteListedInjectable, whiteListedInjectable,
whiteListedInjectableWithArgument, whiteListedInjectableWithArgument,
nonWhiteListedInjectable nonWhiteListedInjectable,
); );
}); });
injectedWhiteListedFunction = di.inject(whiteListedInjectable); injectedWhiteListedFunction = di.inject(whiteListedInjectable);
injectedWhiteListedFunctionWithArgument = di.inject( injectedWhiteListedFunctionWithArgument = di.inject(
whiteListedInjectableWithArgument whiteListedInjectableWithArgument,
); );
injectedNonWhiteListedFunction = di.inject(nonWhiteListedInjectable); injectedNonWhiteListedFunction = di.inject(nonWhiteListedInjectable);
@ -135,7 +135,7 @@ describe("emit-telemetry-from-specific-function-calls", () => {
injectedWhiteListedFunctionWithArgument( injectedWhiteListedFunctionWithArgument(
"irrelevant-argument", "irrelevant-argument",
someObservable someObservable,
); );
}); });

View File

@ -14,9 +14,8 @@ import assert from "assert";
import { isFunction } from "lodash/fp"; import { isFunction } from "lodash/fp";
import emitTelemetryInjectable from "./emit-telemetry.injectable"; import emitTelemetryInjectable from "./emit-telemetry.injectable";
import telemetryWhiteListForFunctionsInjectable, { import type { WhiteListItem } from "./telemetry-white-list-for-functions.injectable";
WhiteListItem, import telemetryWhiteListForFunctionsInjectable from "./telemetry-white-list-for-functions.injectable";
} from "./telemetry-white-list-for-functions.injectable";
const telemetryDecoratorInjectable = getInjectable({ const telemetryDecoratorInjectable = getInjectable({
id: "telemetry-decorator", id: "telemetry-decorator",
@ -25,7 +24,7 @@ const telemetryDecoratorInjectable = getInjectable({
const emitTelemetry = diForDecorator.inject(emitTelemetryInjectable); const emitTelemetry = diForDecorator.inject(emitTelemetryInjectable);
const whiteList = diForDecorator.inject( const whiteList = diForDecorator.inject(
telemetryWhiteListForFunctionsInjectable telemetryWhiteListForFunctionsInjectable,
); );
const whitleListMap = getWhitleListMap(whiteList); const whitleListMap = getWhitleListMap(whiteList);
@ -43,7 +42,7 @@ const telemetryDecoratorInjectable = getInjectable({
assert(currentContext); assert(currentContext);
const whiteListed = whitleListMap.get( const whiteListed = whitleListMap.get(
currentContext.injectable.id currentContext.injectable.id,
); );
if (whiteListed) { if (whiteListed) {
@ -75,7 +74,7 @@ const getWhitleListMap = (whiteList: WhiteListItem[]) =>
? [ ? [
item, item,
{ {
getParams: (...args: any[]) => undefined, getParams: () => undefined,
}, },
] ]
: [ : [
@ -83,8 +82,8 @@ const getWhitleListMap = (whiteList: WhiteListItem[]) =>
{ {
getParams: item.getParams, getParams: item.getParams,
}, },
] ],
) ),
); );
export default telemetryDecoratorInjectable; export default telemetryDecoratorInjectable;