fix: update eslint settings

This commit is contained in:
Joachim Van Herwegen 2020-06-03 16:02:19 +02:00
parent 3e2cfaf11e
commit a07f440ab6
12 changed files with 47 additions and 53 deletions

View File

@ -13,7 +13,11 @@ module.exports = {
],
rules: {
'@typescript-eslint/no-empty-interface': 'off',
"sort-imports": "error",
'@typescript-eslint/space-before-function-paren': [ 'error', 'never' ],
'class-methods-use-this': 'off',
'comma-dangle': ['error', 'always-multiline'],
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'padding-line-between-statements': 'off',
'tsdoc/syntax': 'error',
},
};

View File

@ -46,15 +46,10 @@ export interface AuthenticatedLdpHandlerArgs {
*/
export class AuthenticatedLdpHandler extends HttpHandler {
private readonly requestParser: RequestParser;
private readonly credentialsExtractor: CredentialsExtractor;
private readonly permissionsExtractor: PermissionsExtractor;
private readonly authorizer: Authorizer;
private readonly operationHandler: OperationHandler;
private readonly responseWriter: ResponseWriter;
/**
@ -114,13 +109,9 @@ export class AuthenticatedLdpHandler extends HttpHandler {
*/
private async runHandlers(request: HttpRequest): Promise<Operation> {
const op: Operation = await this.requestParser.handleSafe(request);
const credentials: Credentials = await this.credentialsExtractor.handleSafe(request);
const permissions: PermissionSet = await this.permissionsExtractor.handleSafe(op);
await this.authorizer.handleSafe({ credentials, identifier: op.target, permissions });
await this.operationHandler.handleSafe(op);
return op;

View File

@ -2,7 +2,6 @@ import { AsyncHandler } from '../../src/util/AsyncHandler';
export class StaticAsyncHandler<TOut> extends AsyncHandler<any, TOut> {
private readonly canHandleStatic: boolean;
private readonly handleStatic: TOut;
public constructor(canHandleStatic: boolean, handleStatic: TOut) {