From 2ae141e0d29f7018be284e66a309d4d738d72ff8 Mon Sep 17 00:00:00 2001 From: Matheus Salmi Date: Mon, 3 Jul 2017 23:18:53 -0300 Subject: [PATCH] Fix lint problems --- .../express-flash-2/express-flash-2-tests.ts | 2 +- types/express-flash-2/index.d.ts | 20 ++++++++++--------- types/express-flash-2/tslint.json | 9 ++++++++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/types/express-flash-2/express-flash-2-tests.ts b/types/express-flash-2/express-flash-2-tests.ts index f2578882df..055501d9ff 100644 --- a/types/express-flash-2/express-flash-2-tests.ts +++ b/types/express-flash-2/express-flash-2-tests.ts @@ -1,3 +1,3 @@ import flash from "express-flash-2"; -flash(); \ No newline at end of file +flash(); diff --git a/types/express-flash-2/index.d.ts b/types/express-flash-2/index.d.ts index 578dd4aff3..5c8960277f 100644 --- a/types/express-flash-2/index.d.ts +++ b/types/express-flash-2/index.d.ts @@ -1,22 +1,22 @@ -// Type definitions for express-flash-2 1.0.1 +// Type definitions for express-flash-2 1.0 // Project: https://github.com/jack2gs/express-flash-2 // Definitions by: Matheus Salmi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Express { - export interface Request { + interface Request { session?: Session; } - export interface Session { + interface Session { flash: Flash; } - export interface Flash { - [key: string]: any[] + interface Flash { + [key: string]: any[]; } - export interface Response { + interface Response { /** * Queue flash `msg` of the given `type`. * @@ -41,7 +41,7 @@ declare namespace Express { locals: { flash: Flash - } + }; } } @@ -51,5 +51,7 @@ declare module 'express-flash-2' { /** * Expose `flash()` function on responses. */ - export default function flash(): express.RequestHandler; -} \ No newline at end of file + function flash(): express.RequestHandler; + + export = flash; +} diff --git a/types/express-flash-2/tslint.json b/types/express-flash-2/tslint.json index 3db14f85ea..949f3563fd 100644 --- a/types/express-flash-2/tslint.json +++ b/types/express-flash-2/tslint.json @@ -1 +1,8 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-single-declare-module": false, + "strict-export-declare-modifiers": false, + "expect": false + } +}