Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-02 22:36:25 -05:00
parent 82e7a1f299
commit 1d5056b753
149 changed files with 6104 additions and 3114 deletions

View File

@@ -1,10 +1,10 @@
import {Request} from "../../http/lifecycle/Request";
import {Injectable} from "../../di"
import {Locale} from "../service/Locale";
import {HTTPKernelModule} from "../../http/kernel/HTTPKernelModule";
import {HTTPKernel} from "../../http/kernel/HTTPKernel";
import {InjectSessionHTTPModule} from "../../http/kernel/module/InjectSessionHTTPModule";
import {Session} from "../../http/session/Session";
import {Request} from '../../http/lifecycle/Request'
import {Injectable} from '../../di'
import {Locale} from '../service/Locale'
import {HTTPKernelModule} from '../../http/kernel/HTTPKernelModule'
import {HTTPKernel} from '../../http/kernel/HTTPKernel'
import {InjectSessionHTTPModule} from '../../http/kernel/module/InjectSessionHTTPModule'
import {Session} from '../../http/session/Session'
/**
* An HTTP kernel module that adds the Locale service to the request container.
@@ -14,7 +14,7 @@ export class InjectRequestLocale extends HTTPKernelModule {
public executeWithBlockingWriteback = true
/** Register this kernel module to the given kernel. */
public static register(kernel: HTTPKernel) {
public static register(kernel: HTTPKernel): void {
kernel.register(this).after(InjectSessionHTTPModule)
}
@@ -23,7 +23,7 @@ export class InjectRequestLocale extends HTTPKernelModule {
* service into the Request container based on said locale.
* @param request
*/
public async apply(request: Request) {
public async apply(request: Request): Promise<Request> {
const session = <Session> request.make(Session)
const locale = <Locale> request.make(Locale)