Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d39799d

Browse files
author
Michal Vlasák
committed
🚨 Fix lint
1 parent 5fd9f0e commit d39799d

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/express.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const expressOnFinished = (logger: Cosmas, req: AckeeRequest) => (_err: Error |
5050
logFunction.call(logger, output.data, output.message);
5151
};
5252

53-
const expressMiddleware: RequestHandler = function(
53+
const expressMiddleware: RequestHandler = function (
5454
this: Cosmas,
5555
req: AckeeRequest,
5656
response: AckeeResponse,

src/sentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const createSentryTransformStream = (options: CosmasOptions): any => {
2929
public _transform(chunk: any, _encoding: string, callback: TransformCallback) {
3030
const obj = JSON.parse(chunk);
3131
if (obj.level >= (options.sentryLevel || levels.warn)) {
32-
withScope(scope => {
32+
withScope((scope) => {
3333
scope.setLevel(PINO_TO_SENTRY[obj.level]);
3434
scope.setExtras(obj);
3535
reportToSentry(obj);

src/serializers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const serializers: Dictionary<SerializerFn> = {
2828
},
2929
req(obj: Dictionary<any>): Dictionary<any> {
3030
const pickHeaders = ['x-deviceid', 'authorization', 'user-agent'];
31-
const [body, query] = ['body', 'query'].map(name => {
31+
const [body, query] = ['body', 'query'].map((name) => {
3232
const source = obj[name];
3333
if (source) {
3434
const rest = Object.assign({}, source);
@@ -55,7 +55,7 @@ const serializers: Dictionary<SerializerFn> = {
5555
};
5656

5757
const sliceByPrefix = (prefix: string, paths?: string[]) =>
58-
(paths || []).filter(field => field.startsWith(prefix)).map(field => field.slice(prefix.length));
58+
(paths || []).filter((field) => field.startsWith(prefix)).map((field) => field.slice(prefix.length));
5959

6060
const disablePaths = (paths?: string[]) => {
6161
forEach(serializers, (value, key) => {

src/streams.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const getDefaultTransformStream = (options: CosmasOptions & { messageKey: string
2525
};
2626

2727
const decorateStreams = <T extends Transform>(streams: CosmasStream[], streamClass: new () => T) => {
28-
return streams.map(stream => {
28+
return streams.map((stream) => {
2929
const newStream = new streamClass();
3030
newStream.pipe(stream.stream);
3131
return {
@@ -42,7 +42,7 @@ const initLoggerStreams = (
4242
) => {
4343
let streams: CosmasStream[];
4444
if (options.streams) {
45-
streams = options.streams.map(stream => Object.assign({ level: defaultLevel }, stream));
45+
streams = options.streams.map((stream) => Object.assign({ level: defaultLevel }, stream));
4646
} else {
4747
streams = [
4848
{ level: defaultLevel, maxLevel: levels.warn, stream: process.stdout },

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import omit = require('omit-deep');
66
const removeEmpty = (obj: Dictionary<any>): object =>
77
omit(
88
obj,
9-
Object.keys(obj).filter(key => obj[key] === undefined || isEmpty(obj[key]))
9+
Object.keys(obj).filter((key) => obj[key] === undefined || isEmpty(obj[key]))
1010
);
1111

1212
const matchPath = (pattern: RegExp) => (req: Request): boolean => req.originalUrl.match(pattern) !== null;

0 commit comments

Comments
 (0)