From df4bb363e25a8f6c239feb47a32517ead9ee9b31 Mon Sep 17 00:00:00 2001 From: Denys Sedchenko Date: Fri, 9 Jun 2017 12:57:22 +0300 Subject: [PATCH] Add tslint.json and add style fixes --- types/normalize-url/index.d.ts | 23 ++++++++++++----------- types/normalize-url/tslint.json | 7 +++++++ 2 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 types/normalize-url/tslint.json diff --git a/types/normalize-url/index.d.ts b/types/normalize-url/index.d.ts index 84cca245a5..94cf9ee522 100644 --- a/types/normalize-url/index.d.ts +++ b/types/normalize-url/index.d.ts @@ -1,20 +1,21 @@ -// Type definitions for normalize-url v1.9.1 +// Type definitions for normalize-url 1.9 // Project: https://github.com/sindresorhus/normalize-url // Definitions by: odin3 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module NormalizeUrl { - interface INormalizeUrlArgs { - normalizeProtocol: boolean; - normalizeHttps: boolean; - stripFragment: boolean; - stripWWW: boolean; - removeQueryParameters: string[]; - removeTrailingSlash: boolean; - removeDirectoryIndex: RegExp[]; +declare namespace NormalizeUrl { + interface NormalizeUrlArgs { + normalizeProtocol?: boolean; + normalizeHttps?: boolean; + stripFragment?: boolean; + stripWWW?: boolean; + removeQueryParameters?: string[]; + removeTrailingSlash?: boolean; + removeDirectoryIndex?: RegExp[]; } - function normalizeUrl(url: string, args?: INormalizeUrlArgs): string; + // tslint:disable-next-line align + function normalizeUrl(url: string, args?: NormalizeUrlArgs): string; } export = NormalizeUrl.normalizeUrl; diff --git a/types/normalize-url/tslint.json b/types/normalize-url/tslint.json new file mode 100644 index 0000000000..279473e356 --- /dev/null +++ b/types/normalize-url/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + // This package uses the Function type, and it will take effort to fix. + "ban-types": false + } +}