Skip to content

Commit 2e4ebe9

Browse files
fix(): fix issue, adapt eslint
1 parent 84692a5 commit 2e4ebe9

File tree

5 files changed

+1412
-43
lines changed

5 files changed

+1412
-43
lines changed

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module'
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'prettier',
12+
'prettier/@typescript-eslint'
13+
],
14+
root: true,
15+
env: {
16+
node: true,
17+
jest: true
18+
},
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off'
23+
}
24+
};

lib/router/azure-http.router.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable @typescript-eslint/no-unused-vars */
2+
/* eslint-disable @typescript-eslint/no-empty-function */
13
import { HttpStatus, RequestMethod } from '@nestjs/common';
24
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
35
import { AbstractHttpAdapter } from '@nestjs/core';
@@ -79,6 +81,10 @@ export class AzureHttpRouter extends AbstractHttpAdapter {
7981
return request.url;
8082
}
8183

84+
public getRequestHostname(request: any): string {
85+
return request.hostname;
86+
}
87+
8288
public createMiddlewareFactory(
8389
requestMethod: RequestMethod
8490
): (path: string, callback: Function) => any {

0 commit comments

Comments
 (0)