From 5910843e726dcfbd153a0fe0620ae5094b6845a0 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Mon, 31 Aug 2020 13:20:23 -0700 Subject: [PATCH] chore: fix eslint violations reported by typescript-eslint 4.0.x Signed-off-by: Raymond Feng --- .../acceptance/passport-login.acceptance.ts | 1 + .../__tests__/acceptance/todo.acceptance.ts | 1 + .../src/context-explorer.component.ts | 1 - .../src/context-explorer.controller.ts | 1 - extensions/health/src/health.component.ts | 1 - extensions/metrics/src/metrics.component.ts | 1 - .../src/mock-oauth2-social-app.ts | 7 --- .../src/authorize-interceptor.ts | 1 - packages/context/src/binding-key.ts | 8 ++- packages/context/src/binding.ts | 8 +-- packages/context/src/context-view.ts | 12 ++--- packages/context/src/interception-proxy.ts | 3 +- packages/context/src/value-promise.ts | 4 +- .../middleware-registeration.acceptance.ts | 4 +- .../express/src/middleware-interceptor.ts | 8 +-- packages/metadata/src/decorator-factory.ts | 50 +++++++++---------- packages/metadata/src/types.ts | 9 ++-- packages/openapi-v3/src/controller-spec.ts | 3 +- .../src/decorators/response.decorator.ts | 6 ++- .../relations-helpers-fixtures.ts | 2 - .../src/relations/relation.helpers.ts | 5 +- .../src/repositories/legacy-juggler-bridge.ts | 4 +- .../rest-crud/src/crud-rest.controller.ts | 1 + .../src/rest-explorer.component.ts | 1 - .../src/rest-explorer.controller.ts | 1 - .../middleware-registeration.acceptance.ts | 4 +- .../request-context.integration.ts | 2 +- .../service-proxy/src/mixins/service.mixin.ts | 10 ++-- packages/testlab/src/skip.ts | 1 + 29 files changed, 73 insertions(+), 87 deletions(-) diff --git a/examples/passport-login/src/__tests__/acceptance/passport-login.acceptance.ts b/examples/passport-login/src/__tests__/acceptance/passport-login.acceptance.ts index 208adab28d18..e998ed8482e4 100644 --- a/examples/passport-login/src/__tests__/acceptance/passport-login.acceptance.ts +++ b/examples/passport-login/src/__tests__/acceptance/passport-login.acceptance.ts @@ -40,6 +40,7 @@ describe('example-passport-login acceptance test', () => { */ before(() => MockTestOauth2SocialApp.startMock()); after(MockTestOauth2SocialApp.stopMock); + before(async function setupApplication(this: Mocha.Context) { this.timeout(6000); server = await startApplication(oauth2Providers); diff --git a/examples/todo/src/__tests__/acceptance/todo.acceptance.ts b/examples/todo/src/__tests__/acceptance/todo.acceptance.ts index 4b14b8df1e2e..d807196342ae 100644 --- a/examples/todo/src/__tests__/acceptance/todo.acceptance.ts +++ b/examples/todo/src/__tests__/acceptance/todo.acceptance.ts @@ -39,6 +39,7 @@ describe('TodoApplication', () => { after(() => app.stop()); let available = true; + before(async function (this: Mocha.Context) { this.timeout(30 * 1000); const service = await app.get('services.Geocoder'); diff --git a/extensions/context-explorer/src/context-explorer.component.ts b/extensions/context-explorer/src/context-explorer.component.ts index 5aac5cfa616a..5c6b743dfeaa 100644 --- a/extensions/context-explorer/src/context-explorer.component.ts +++ b/extensions/context-explorer/src/context-explorer.component.ts @@ -6,7 +6,6 @@ import { bind, Component, - // eslint-disable-next-line @typescript-eslint/no-unused-vars config, ContextTags, CoreBindings, diff --git a/extensions/context-explorer/src/context-explorer.controller.ts b/extensions/context-explorer/src/context-explorer.controller.ts index 2426055a2c2c..dad6a191038c 100644 --- a/extensions/context-explorer/src/context-explorer.controller.ts +++ b/extensions/context-explorer/src/context-explorer.controller.ts @@ -3,7 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -/* eslint-disable @typescript-eslint/no-unused-vars */ import {config, Constructor, Context, inject, JSONObject} from '@loopback/core'; import { api, diff --git a/extensions/health/src/health.component.ts b/extensions/health/src/health.component.ts index 1ec0b8c8af7e..419821bd7a14 100644 --- a/extensions/health/src/health.component.ts +++ b/extensions/health/src/health.component.ts @@ -9,7 +9,6 @@ import { bind, BindingScope, Component, - // eslint-disable-next-line @typescript-eslint/no-unused-vars config, ContextTags, CoreBindings, diff --git a/extensions/metrics/src/metrics.component.ts b/extensions/metrics/src/metrics.component.ts index 6c0e30bb33d1..85cc3655e6b9 100644 --- a/extensions/metrics/src/metrics.component.ts +++ b/extensions/metrics/src/metrics.component.ts @@ -7,7 +7,6 @@ import { Application, bind, Component, - // eslint-disable-next-line @typescript-eslint/no-unused-vars config, ContextTags, CoreBindings, diff --git a/fixtures/mock-oauth2-provider/src/mock-oauth2-social-app.ts b/fixtures/mock-oauth2-provider/src/mock-oauth2-social-app.ts index 6cdfee1188ab..e05717f2e207 100644 --- a/fixtures/mock-oauth2-provider/src/mock-oauth2-social-app.ts +++ b/fixtures/mock-oauth2-provider/src/mock-oauth2-social-app.ts @@ -35,13 +35,6 @@ app.use(bodyParser.text({type: 'text/html'})); // create application/x-www-form-urlencoded parser const urlencodedParser = bodyParser.urlencoded({extended: false}); -interface JWT { - payload: { - jti: string; - client_id: string; - }; -} - /** * data structure for an app registration, also holds issued tokens for an app */ diff --git a/packages/authorization/src/authorize-interceptor.ts b/packages/authorization/src/authorize-interceptor.ts index bd83c3479885..9a3fa92d036c 100644 --- a/packages/authorization/src/authorize-interceptor.ts +++ b/packages/authorization/src/authorize-interceptor.ts @@ -7,7 +7,6 @@ import { asGlobalInterceptor, bind, BindingAddress, - // eslint-disable-next-line @typescript-eslint/no-unused-vars config, Context, Interceptor, diff --git a/packages/context/src/binding-key.ts b/packages/context/src/binding-key.ts index 1a7f814d360c..e859a346ab27 100644 --- a/packages/context/src/binding-key.ts +++ b/packages/context/src/binding-key.ts @@ -7,6 +7,7 @@ import {generateUniqueId} from './unique-id'; export type BindingAddress = string | BindingKey; +// eslint-disable-next-line @typescript-eslint/no-unused-vars export class BindingKey { static readonly PROPERTY_SEPARATOR = '#'; @@ -25,16 +26,13 @@ export class BindingKey { * is allowed to contain propertyPath as encoded via `BindingKey#toString()` * @param propertyPath - Optional path to a deep property of the bound value. */ - public static create( - key: string, - propertyPath?: string, - ): BindingKey { + public static create(key: string, propertyPath?: string): BindingKey { // TODO(bajtos) allow chaining of propertyPaths, e.g. // BindingKey.create('config#rest', 'port') // should create {key: 'config', path: 'rest.port'} if (propertyPath) { BindingKey.validate(key); - return new BindingKey(key, propertyPath); + return new BindingKey(key, propertyPath); } return BindingKey.parseKeyWithPath(key); diff --git a/packages/context/src/binding.ts b/packages/context/src/binding.ts index dd68472d9405..d4b39e3caab9 100644 --- a/packages/context/src/binding.ts +++ b/packages/context/src/binding.ts @@ -855,7 +855,7 @@ export class Binding extends EventEmitter { * easy to read. * @param key - Binding key */ - static bind(key: BindingAddress): Binding { + static bind(key: BindingAddress): Binding { return new Binding(key); } @@ -868,13 +868,13 @@ export class Binding extends EventEmitter { * .to({port: 3000}); * ``` * - * @typeParam T Generic type for the configuration value (not the binding to + * @typeParam V Generic type for the configuration value (not the binding to * be configured) * * @param key - Key for the binding to be configured */ - static configure(key: BindingAddress): Binding { - return new Binding(BindingKey.buildKeyForConfig(key)).tag({ + static configure(key: BindingAddress): Binding { + return new Binding(BindingKey.buildKeyForConfig(key)).tag({ [ContextTags.CONFIGURATION_FOR]: key.toString(), }); } diff --git a/packages/context/src/context-view.ts b/packages/context/src/context-view.ts index f678eca62271..8e4d5784af0e 100644 --- a/packages/context/src/context-view.ts +++ b/packages/context/src/context-view.ts @@ -251,7 +251,7 @@ export class ContextView */ on( eventName: 'bind', - listener: (event: ContextViewEvent) => void, + listener: (event: ContextViewEvent) => void, ): this; /** @@ -262,7 +262,7 @@ export class ContextView */ on( eventName: 'unbind', - listener: (event: ContextViewEvent & {cachedValue?: T}) => void, + listener: (event: ContextViewEvent & {cachedValue?: V}) => void, ): this; /** @@ -282,7 +282,7 @@ export class ContextView * @param listener The listener function to call when the event is emitted. */ // eslint-disable-next-line @typescript-eslint/unified-signatures - on(eventName: 'refresh', listener: (result: T[]) => void): this; + on(eventName: 'refresh', listener: (result: V[]) => void): this; /** * The "close" event is emitted when the view is closed (stopped observing @@ -311,7 +311,7 @@ export class ContextView */ once( eventName: 'bind', - listener: (event: ContextViewEvent) => void, + listener: (event: ContextViewEvent) => void, ): this; /** @@ -322,7 +322,7 @@ export class ContextView */ once( eventName: 'unbind', - listener: (event: ContextViewEvent & {cachedValue?: T}) => void, + listener: (event: ContextViewEvent & {cachedValue?: V}) => void, ): this; /** @@ -342,7 +342,7 @@ export class ContextView * @param listener The listener function to call when the event is emitted. */ // eslint-disable-next-line @typescript-eslint/unified-signatures - once(eventName: 'refresh', listener: (result: T[]) => void): this; + once(eventName: 'refresh', listener: (result: V[]) => void): this; /** * The "close" event is emitted when the view is closed (stopped observing diff --git a/packages/context/src/interception-proxy.ts b/packages/context/src/interception-proxy.ts index c00d48127b8d..7be05e4a29cc 100644 --- a/packages/context/src/interception-proxy.ts +++ b/packages/context/src/interception-proxy.ts @@ -23,7 +23,8 @@ export type AsValueOrPromise = T extends Promise */ export type AsInterceptedFunction = T extends ( ...args: InvocationArgs -) => infer R +) => // eslint-disable-next-line @typescript-eslint/no-unused-vars +infer R ? (...args: InvocationArgs) => AsValueOrPromise : T; diff --git a/packages/context/src/value-promise.ts b/packages/context/src/value-promise.ts index 44bdd9368d83..b83808ab157c 100644 --- a/packages/context/src/value-promise.ts +++ b/packages/context/src/value-promise.ts @@ -94,7 +94,7 @@ export function getDeepProperty( */ export function resolveMap( map: MapObject, - resolver: (val: T, key: string, map: MapObject) => ValueOrPromise, + resolver: (val: T, key: string, values: MapObject) => ValueOrPromise, ): ValueOrPromise> { const result: MapObject = {}; let asyncResolvers: PromiseLike[] | undefined = undefined; @@ -156,7 +156,7 @@ export function resolveMap( */ export function resolveList( list: T[], - resolver: (val: T, index: number, list: T[]) => ValueOrPromise, + resolver: (val: T, index: number, values: T[]) => ValueOrPromise, ): ValueOrPromise { const result: V[] = new Array(list.length); let asyncResolvers: PromiseLike[] | undefined = undefined; diff --git a/packages/express/src/__tests__/acceptance/middleware-registeration.acceptance.ts b/packages/express/src/__tests__/acceptance/middleware-registeration.acceptance.ts index 5b5679ea94a2..5960c61bb689 100644 --- a/packages/express/src/__tests__/acceptance/middleware-registeration.acceptance.ts +++ b/packages/express/src/__tests__/acceptance/middleware-registeration.acceptance.ts @@ -110,10 +110,10 @@ describe('Express middleware registry', () => { }); it('registers a LoopBack middleware provider with config injection', async () => { - type SpyConfig = {headerName: string}; + type TestSpyConfig = {headerName: string}; class SpyMiddlewareProviderWithConfig implements Provider { @config() - private options: SpyConfig; + private options: TestSpyConfig; value(): Middleware { return async ({request, response}, next) => { response.set( diff --git a/packages/express/src/middleware-interceptor.ts b/packages/express/src/middleware-interceptor.ts index 6e4a0deefe97..374f492fa240 100644 --- a/packages/express/src/middleware-interceptor.ts +++ b/packages/express/src/middleware-interceptor.ts @@ -386,10 +386,7 @@ export function registerExpressMiddlewareInterceptor( middlewareConfig, options, ); - const binding = createMiddlewareInterceptorBinding( - providerClass, - options, - ); + const binding = createMiddlewareInterceptorBinding(providerClass, options); ctx.add(binding); return binding; } @@ -400,9 +397,8 @@ export function registerExpressMiddlewareInterceptor( * @param middlewareProviderClass - Middleware provider class * @param options - Options to create middlewareFactory interceptor binding * - * @typeParam CFG - Configuration type */ -export function createMiddlewareInterceptorBinding( +export function createMiddlewareInterceptorBinding( middlewareProviderClass: Constructor>, options: MiddlewareInterceptorBindingOptions = {}, ) { diff --git a/packages/metadata/src/decorator-factory.ts b/packages/metadata/src/decorator-factory.ts index fcdce6aeeea4..d4094d2a4cd8 100644 --- a/packages/metadata/src/decorator-factory.ts +++ b/packages/metadata/src/decorator-factory.ts @@ -337,11 +337,11 @@ export class DecoratorFactory< * @param options - Options for the decorator */ protected static _createDecorator< - T, - M extends T | MetadataMap | MetadataMap, - D extends DecoratorType - >(key: MetadataKey, spec: T, options?: DecoratorOptions): D { - const inst = new this(key.toString(), spec, options); + S, + MT extends S | MetadataMap | MetadataMap, + DT extends DecoratorType + >(key: MetadataKey, spec: S, options?: DecoratorOptions): DT { + const inst = new this(key.toString(), spec, options); return inst.create(); } @@ -422,12 +422,12 @@ export class ClassDecoratorFactory extends DecoratorFactory< * @param spec - Metadata object from the decorator function * @param options - Options for the decorator */ - static createDecorator( - key: MetadataKey, - spec: T, + static createDecorator( + key: MetadataKey, + spec: S, options?: DecoratorOptions, ) { - return super._createDecorator(key, spec, options); + return super._createDecorator(key, spec, options); } } @@ -483,12 +483,12 @@ export class PropertyDecoratorFactory extends DecoratorFactory< * @param spec - Metadata object from the decorator function * @param options - Options for the decorator */ - static createDecorator( - key: MetadataKey, - spec: T, + static createDecorator( + key: MetadataKey, + spec: S, options?: DecoratorOptions, ) { - return super._createDecorator, PropertyDecorator>( + return super._createDecorator, PropertyDecorator>( key, spec, options, @@ -549,12 +549,12 @@ export class MethodDecoratorFactory extends DecoratorFactory< * @param spec - Metadata object from the decorator function * @param options - Options for the decorator */ - static createDecorator( - key: MetadataKey, - spec: T, + static createDecorator( + key: MetadataKey, + spec: S, options?: DecoratorOptions, ) { - return super._createDecorator, MethodDecorator>( + return super._createDecorator, MethodDecorator>( key, spec, options, @@ -642,12 +642,12 @@ export class ParameterDecoratorFactory extends DecoratorFactory< * @param spec - Metadata object from the decorator function * @param options - Options for the decorator */ - static createDecorator( - key: MetadataKey, - spec: T, + static createDecorator( + key: MetadataKey, + spec: S, options?: DecoratorOptions, ) { - return super._createDecorator, ParameterDecorator>( + return super._createDecorator, ParameterDecorator>( key, spec, options, @@ -777,12 +777,12 @@ export class MethodParameterDecoratorFactory extends DecoratorFactory< * @param spec - Metadata object from the decorator function * @param options - Options for the decorator */ - static createDecorator( - key: MetadataKey, - spec: T, + static createDecorator( + key: MetadataKey, + spec: S, options?: DecoratorOptions, ) { - return super._createDecorator, MethodDecorator>( + return super._createDecorator, MethodDecorator>( key, spec, options, diff --git a/packages/metadata/src/types.ts b/packages/metadata/src/types.ts index bfd5ebc39d0b..26f011cc1298 100644 --- a/packages/metadata/src/types.ts +++ b/packages/metadata/src/types.ts @@ -17,6 +17,7 @@ export type DecoratorType = * @typeParam T - Type of the metadata value * @typeParam D - Type of the decorator */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars export class MetadataAccessor { private constructor(public readonly key: string) {} @@ -27,11 +28,11 @@ export class MetadataAccessor { /** * Create a strongly-typed metadata accessor * @param key - The metadata key - * @typeParam T - Type of the metadata value - * @typeParam D - Type of the decorator + * @typeParam V - Type of the metadata value + * @typeParam DT - Type of the decorator */ - static create(key: string) { - return new MetadataAccessor(key); + static create(key: string) { + return new MetadataAccessor(key); } } diff --git a/packages/openapi-v3/src/controller-spec.ts b/packages/openapi-v3/src/controller-spec.ts index 1e3293a9aef8..49739a703767 100644 --- a/packages/openapi-v3/src/controller-spec.ts +++ b/packages/openapi-v3/src/controller-spec.ts @@ -363,7 +363,8 @@ function processSchemaExtensions( * You cannot provide BOTH a defnintion AND one of these keywords. */ /* istanbul ignore else */ - const hasOwn = (prop: string) => schema?.hasOwnProperty(prop); + const hasOwn = (prop: string) => + schema != null && Object.prototype.hasOwnProperty.call(schema, prop); if (SCHEMA_ARR_KEYS.some(k => hasOwn(k))) { SCHEMA_ARR_KEYS.forEach((k: MixKey) => { diff --git a/packages/openapi-v3/src/decorators/response.decorator.ts b/packages/openapi-v3/src/decorators/response.decorator.ts index ca08437e0cec..224ea9c5d2d9 100644 --- a/packages/openapi-v3/src/decorators/response.decorator.ts +++ b/packages/openapi-v3/src/decorators/response.decorator.ts @@ -20,7 +20,11 @@ interface ResponseWithContent extends ResponseObject { } // eslint-disable-next-line @typescript-eslint/no-explicit-any function isResponseObject(c: any): c is ResponseWithContent { - return !!c?.hasOwnProperty('content') && !!c.content; + return ( + c != null && + Object.prototype.hasOwnProperty.call(c, 'content') && + c.content != null + ); } function buildDecoratorReducer( diff --git a/packages/repository/src/__tests__/unit/repositories/relations-helpers/relations-helpers-fixtures.ts b/packages/repository/src/__tests__/unit/repositories/relations-helpers/relations-helpers-fixtures.ts index 5e1ce8b617c5..eb3a293182fe 100644 --- a/packages/repository/src/__tests__/unit/repositories/relations-helpers/relations-helpers-fixtures.ts +++ b/packages/repository/src/__tests__/unit/repositories/relations-helpers/relations-helpers-fixtures.ts @@ -34,7 +34,6 @@ export class Manufacturer extends Entity { interface ManufacturerRelations { products?: ProductWithRelations; } -type ManufacturerWithRelations = Manufacturer & ManufacturerRelations; export class ManufacturerRepository extends DefaultCrudRepository< Manufacturer, @@ -126,7 +125,6 @@ export class Category extends Entity { interface CategoryRelations { products?: ProductWithRelations; } -type CategoryWithRelations = Category & CategoryRelations; export class CategoryRepository extends DefaultCrudRepository< Category, diff --git a/packages/repository/src/relations/relation.helpers.ts b/packages/repository/src/relations/relation.helpers.ts index c40cbe124c8a..e9ea38479687 100644 --- a/packages/repository/src/relations/relation.helpers.ts +++ b/packages/repository/src/relations/relation.helpers.ts @@ -151,10 +151,7 @@ function isInclusionAllowed( * @param targetKey - name of the target key * */ -export function flattenTargetsOfOneToOneRelation< - SourceWithRelations extends Entity, - Target extends Entity ->( +export function flattenTargetsOfOneToOneRelation( sourceIds: unknown[], targetEntities: Target[], targetKey: StringKeyOf, diff --git a/packages/repository/src/repositories/legacy-juggler-bridge.ts b/packages/repository/src/repositories/legacy-juggler-bridge.ts index a02116d2b6b4..b07382684e52 100644 --- a/packages/repository/src/repositories/legacy-juggler-bridge.ts +++ b/packages/repository/src/repositories/legacy-juggler-bridge.ts @@ -54,9 +54,9 @@ export namespace juggler { export import PersistedModel = legacy.PersistedModel; export import KeyValueModel = legacy.KeyValueModel; export import PersistedModelClass = legacy.PersistedModelClass; - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow export import Transaction = legacy.Transaction; - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow export import IsolationLevel = legacy.IsolationLevel; } diff --git a/packages/rest-crud/src/crud-rest.controller.ts b/packages/rest-crud/src/crud-rest.controller.ts index eb88f1856fea..8e78d7fdab0f 100644 --- a/packages/rest-crud/src/crud-rest.controller.ts +++ b/packages/rest-crud/src/crud-rest.controller.ts @@ -64,6 +64,7 @@ export interface CrudRestController< T extends Entity, IdType, IdName extends keyof T, + // eslint-disable-next-line @typescript-eslint/no-unused-vars Relations extends object = {} > { /** diff --git a/packages/rest-explorer/src/rest-explorer.component.ts b/packages/rest-explorer/src/rest-explorer.component.ts index 94e06eb63a5c..f6c029f4670a 100644 --- a/packages/rest-explorer/src/rest-explorer.component.ts +++ b/packages/rest-explorer/src/rest-explorer.component.ts @@ -6,7 +6,6 @@ import { bind, Component, - // eslint-disable-next-line @typescript-eslint/no-unused-vars config, ContextTags, CoreBindings, diff --git a/packages/rest-explorer/src/rest-explorer.controller.ts b/packages/rest-explorer/src/rest-explorer.controller.ts index 546395d89ed9..e037d08a1f60 100644 --- a/packages/rest-explorer/src/rest-explorer.controller.ts +++ b/packages/rest-explorer/src/rest-explorer.controller.ts @@ -3,7 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -// eslint-disable-next-line @typescript-eslint/no-unused-vars import {config, inject} from '@loopback/core'; import { OpenApiSpecForm, diff --git a/packages/rest/src/__tests__/acceptance/middleware/middleware-registeration.acceptance.ts b/packages/rest/src/__tests__/acceptance/middleware/middleware-registeration.acceptance.ts index 2c06c593dc32..e7de2efe9530 100644 --- a/packages/rest/src/__tests__/acceptance/middleware/middleware-registeration.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/middleware/middleware-registeration.acceptance.ts @@ -84,10 +84,10 @@ describe('Express middleware registry', () => { }); it('registers a LoopBack middleware provider with config injection', async () => { - type SpyConfig = {headerName: string}; + type TestSpyConfig = {headerName: string}; class SpyMiddlewareProviderWithConfig implements Provider { @config() - private options: SpyConfig; + private options: TestSpyConfig; value(): Middleware { return async ({request, response}, next) => { response.set( diff --git a/packages/rest/src/__tests__/integration/request-context.integration.ts b/packages/rest/src/__tests__/integration/request-context.integration.ts index 13f9e4924142..649bcb0acdde 100644 --- a/packages/rest/src/__tests__/integration/request-context.integration.ts +++ b/packages/rest/src/__tests__/integration/request-context.integration.ts @@ -154,7 +154,7 @@ async function teardown() { async function givenRunningAppWithClient( restOptions?: RestServerConfig, - setupFn: (app: RestApplication) => void = () => {}, + setupFn: (restApp: RestApplication) => void = () => {}, ) { const options: ApplicationConfig = { rest: givenHttpServerConfig(restOptions), diff --git a/packages/service-proxy/src/mixins/service.mixin.ts b/packages/service-proxy/src/mixins/service.mixin.ts index f99a6795e794..4baad1023d11 100644 --- a/packages/service-proxy/src/mixins/service.mixin.ts +++ b/packages/service-proxy/src/mixins/service.mixin.ts @@ -114,8 +114,8 @@ export function ServiceMixin>( // from mapped types. https://github.com/microsoft/TypeScript/issues/38496 // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - component( - componentCtor: Constructor, + component( + componentCtor: Constructor, nameOrOptions?: string | BindingFromClassOptions, ) { const binding = super.component(componentCtor, nameOrOptions); @@ -130,9 +130,9 @@ export function ServiceMixin>( * * @param component - The component to mount services of */ - mountComponentServices( - component: Constructor, - componentBindingKey?: BindingAddress, + mountComponentServices( + component: Constructor, + componentBindingKey?: BindingAddress, ) { const componentKey = componentBindingKey ?? `components.${component.name}`; diff --git a/packages/testlab/src/skip.ts b/packages/testlab/src/skip.ts index 7baea86e891d..7164f07708e6 100644 --- a/packages/testlab/src/skip.ts +++ b/packages/testlab/src/skip.ts @@ -6,6 +6,7 @@ /** * A function defining a new test case or a test suite, e.g. `it` or `describe`. */ +// eslint-disable-next-line @typescript-eslint/no-unused-vars export type TestDefinition = ( name: string, ...args: ARGS