Skip to content

Commit 96b13c3

Browse files
committed
chore: fix lint
Signed-off-by: Francisco Buceta <[email protected]>
1 parent 8093f29 commit 96b13c3

File tree

14 files changed

+44
-22
lines changed

14 files changed

+44
-22
lines changed

benchmark/src/autocannon.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export interface EndpointStats {
1212
}
1313

1414
export class Autocannon {
15-
constructor(protected url: string, protected duration: number) {}
15+
constructor(
16+
protected url: string,
17+
protected duration: number,
18+
) {}
1619

1720
async execute(
1821
title: string,

examples/binding-resolution/src/services/counter.service.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import {Binding, Context, inject, Provider} from '@loopback/core';
77
import {logContexts} from '../util';
88

99
export class Counter {
10-
constructor(public readonly scope: string, public value: number) {}
10+
constructor(
11+
public readonly scope: string,
12+
public value: number,
13+
) {}
1114

1215
inc() {
1316
this.value++;

examples/webpack/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ npx webpack --config-name web
2424
Now `dist/bundle-web.js` can be used for HTML pages, for example:
2525

2626
```html
27-
<!DOCTYPE html>
27+
<!doctype html>
2828
<html>
2929
<head>
3030
<title>LoopBack 4 Core Modules WebPack Demo</title>

extensions/socketio/src/socketio-controller-factory.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ type SocketIoEventMatcherInfo = {
3131
* Request context for a socket.io request
3232
*/
3333
export class SocketIoConnectionContext extends Context {
34-
constructor(public readonly socket: Socket, parent: Context) {
34+
constructor(
35+
public readonly socket: Socket,
36+
parent: Context,
37+
) {
3538
super(parent);
3639
}
3740
}

fixtures/tsdocs-monorepo/packages/pkg1/src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export class Pet {
1212
* @param name - Name of the pet
1313
* @param kind - Kind of the pet
1414
*/
15-
constructor(public readonly name: string, public readonly kind: string) {}
15+
constructor(
16+
public readonly name: string,
17+
public readonly kind: string,
18+
) {}
1619

1720
/**
1821
* Greet the pet

packages/cli/generators/relation/has-many-through-relation.generator.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ module.exports = class HasManyThroughRelationGenerator extends (
304304
)}.prototype.${this.artifactInfo.dstModelPrimaryKey},
305305
${utils.toClassName(this.artifactInfo.throughModelClass)},
306306
typeof ${utils.toClassName(this.artifactInfo.srcModelClass)}.prototype.${
307-
this.artifactInfo.srcModelPrimaryKey
308-
}
307+
this.artifactInfo.srcModelPrimaryKey
308+
}
309309
>`;
310310
}
311311

packages/context/src/__tests__/unit/value-promise.unit.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ describe('transformValueOrPromise', () => {
292292
});
293293

294294
it('transforms a promise', async () => {
295-
const result = await transformValueOrPromise(Promise.resolve('a'), v =>
296-
v?.toUpperCase(),
295+
const result = await transformValueOrPromise(
296+
Promise.resolve('a'),
297+
v => v?.toUpperCase(),
297298
);
298299
expect(result).to.eql('A');
299300
});

packages/context/src/binding.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,10 @@ export class Binding<T = BoundValue> extends EventEmitter {
406406
: undefined;
407407
}
408408

409-
constructor(key: BindingAddress<T>, public isLocked: boolean = false) {
409+
constructor(
410+
key: BindingAddress<T>,
411+
public isLocked: boolean = false,
412+
) {
410413
super();
411414
BindingKey.validate(key);
412415
this.key = key.toString();

packages/repository/src/relations/has-many/has-many-through.repository-factory.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ export type HasManyThroughRepositoryFactory<
3939
ThroughEntity extends Entity,
4040
SourceID,
4141
> = {
42-
(fkValue: SourceID): HasManyThroughRepository<
43-
TargetEntity,
44-
TargetID,
45-
ThroughEntity
46-
>;
42+
(
43+
fkValue: SourceID,
44+
): HasManyThroughRepository<TargetEntity, TargetID, ThroughEntity>;
4745

4846
/**
4947
* Use `resolver` property to obtain an InclusionResolver for this relation.

packages/repository/src/repositories/legacy-juggler-bridge.ts

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ import {
5555
} from './repository';
5656

5757
export namespace juggler {
58-
/* eslint-disable @typescript-eslint/no-unused-vars */
5958
export import DataSource = legacy.DataSource;
6059
export import ModelBase = legacy.ModelBase;
6160
export import ModelBaseClass = legacy.ModelBaseClass;

packages/rest/src/parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async function buildOperationArguments(
7171
throw new Error('$ref requestBody is not supported yet.');
7272
}
7373
const i = operationSpec.requestBody[REQUEST_BODY_INDEX];
74-
requestBodyIndex = i != null ? i : 0;
74+
requestBodyIndex = i ?? 0;
7575
}
7676

7777
const paramArgs: OperationArgs = [];

packages/rest/src/rest.server.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ export class RestServer
280280

281281
// Mount our router & request handler
282282
this._expressApp.use(this._basePath, (req, res, next) => {
283-
this._handleHttpRequest(req, res).catch(next);
283+
// eslint-disable-next-line no-void
284+
void this._handleHttpRequest(req, res).catch(next);
284285
});
285286

286287
// Mount our error handler

packages/service-proxy/src/legacy-juggler-bridge.ts

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import legacy from 'loopback-datasource-juggler';
77

88
export namespace juggler {
9-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
109
export import DataSource = legacy.DataSource;
1110
}
1211

packages/testlab/src/__tests__/unit/to-json.test.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ describe('toJSON', () => {
102102
class Customer {
103103
private _data: object;
104104

105-
constructor(public id: string, public email: string) {
105+
constructor(
106+
public id: string,
107+
public email: string,
108+
) {
106109
this._data = {id, email};
107110
}
108111

@@ -118,7 +121,10 @@ describe('toJSON', () => {
118121

119122
it('handles nested class instance with custom toJSON', () => {
120123
class Address {
121-
constructor(public street: string, public city: string) {}
124+
constructor(
125+
public street: string,
126+
public city: string,
127+
) {}
122128

123129
toJSON() {
124130
return {
@@ -130,7 +136,10 @@ describe('toJSON', () => {
130136
}
131137

132138
class Customer {
133-
constructor(public email: string, public address: Address) {}
139+
constructor(
140+
public email: string,
141+
public address: Address,
142+
) {}
134143

135144
toJSON() {
136145
return {

0 commit comments

Comments
 (0)