Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user