From 3f7bbeaa51297fb4eaacb784f0baa9806b42ad1e Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 30 Oct 2017 11:05:43 -0700 Subject: [PATCH] Miscellaneous lint fixes (#21116) --- types/adone/glosses/datetime.d.ts | 3 --- types/ignite-ui/index.d.ts | 36 ------------------------- types/jest-matcher-utils/package.json | 6 +++++ types/jquery/v1/jquery-tests.ts | 33 ++++++++++++----------- types/jquery/v2/jquery-tests.ts | 33 ++++++++++++----------- types/knuddels-userapps-api/tslint.json | 4 ++- types/markerclustererplus/index.d.ts | 2 -- types/restify-plugins/index.d.ts | 15 ----------- 8 files changed, 43 insertions(+), 89 deletions(-) create mode 100644 types/jest-matcher-utils/package.json diff --git a/types/adone/glosses/datetime.d.ts b/types/adone/glosses/datetime.d.ts index 417f706d95..5ce320f613 100644 --- a/types/adone/glosses/datetime.d.ts +++ b/types/adone/glosses/datetime.d.ts @@ -731,9 +731,6 @@ declare namespace adone { */ creationData(): DatetimeCreationData; - /** - * - */ parsingFlags(): DatetimeParsingFlags; /** diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts index f4125c44cb..bff55ec33d 100644 --- a/types/ignite-ui/index.d.ts +++ b/types/ignite-ui/index.d.ts @@ -26081,8 +26081,6 @@ interface IgNumericEditor { */ toUpper?: any; - /** - */ textMode?: any; /** @@ -26636,8 +26634,6 @@ interface IgCurrencyEditor { */ toUpper?: any; - /** - */ textMode?: any; /** @@ -27068,8 +27064,6 @@ interface IgPercentEditor { */ toUpper?: any; - /** - */ textMode?: any; /** @@ -27429,8 +27423,6 @@ interface IgMaskEditor { */ dropDownOnReadOnly?: boolean; - /** - */ textMode?: any; /** @@ -27928,8 +27920,6 @@ interface IgDateEditor { */ dropDownOrientation?: string; - /** - */ textMode?: any; /** @@ -28450,8 +28440,6 @@ interface IgDatePicker { */ dropDownOrientation?: string; - /** - */ textMode?: any; /** @@ -30868,12 +30856,8 @@ interface JQuery { */ igNumericEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; - /** - */ igNumericEditor(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igNumericEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** @@ -31777,12 +31761,8 @@ interface JQuery { */ igCurrencyEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; - /** - */ igCurrencyEditor(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igCurrencyEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** @@ -32563,12 +32543,8 @@ interface JQuery { */ igPercentEditor(optionLiteral: 'option', optionName: "toUpper", optionValue: any): void; - /** - */ igPercentEditor(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igPercentEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** @@ -33206,12 +33182,8 @@ interface JQuery { */ igMaskEditor(optionLiteral: 'option', optionName: "dropDownOnReadOnly", optionValue: boolean): void; - /** - */ igMaskEditor(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igMaskEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** @@ -34144,12 +34116,8 @@ interface JQuery { */ igDateEditor(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; - /** - */ igDateEditor(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igDateEditor(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** @@ -35092,12 +35060,8 @@ interface JQuery { */ igDatePicker(optionLiteral: 'option', optionName: "dropDownOrientation", optionValue: string): void; - /** - */ igDatePicker(optionLiteral: 'option', optionName: "textMode"): any; - /** - */ igDatePicker(optionLiteral: 'option', optionName: "textMode", optionValue: any): void; /** diff --git a/types/jest-matcher-utils/package.json b/types/jest-matcher-utils/package.json new file mode 100644 index 0000000000..2cc9b48ed6 --- /dev/null +++ b/types/jest-matcher-utils/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "chalk": "^2.2.0" + } +} diff --git a/types/jquery/v1/jquery-tests.ts b/types/jquery/v1/jquery-tests.ts index 4b6fc4e0db..d00c075125 100644 --- a/types/jquery/v1/jquery-tests.ts +++ b/types/jquery/v1/jquery-tests.ts @@ -2215,8 +2215,8 @@ function test_hide() { $("p").hide("slow"); }); $("#hidr").click(function () { - $("span:last-child").hide("fast", function () { - $(this).prev().hide("fast", arguments.callee); + $("span:last-child").hide("fast", function f() { + $(this).prev().hide("fast", f); }); }); $("#showr").click(function () { @@ -3126,20 +3126,21 @@ function test_map() { }).get().join(", ")); var mappedItems = $("li").map(function (index) { var replacement:any = $("
  • ").text($(this).text()).get(0); - if (index === 0) { - - // Make the first item all caps - $(replacement).text($(replacement).text().toUpperCase()); - } else if (index === 1 || index === 3) { - - // Delete the second and fourth items - replacement = null; - } else if (index === 2) { - - // Make two of the third item and add some text - replacement = [replacement, $("
  • ").get(0)]; - $(replacement[0]).append(" - A"); - $(replacement[1]).append("Extra - B"); + switch (index) { + case 0: + // Make the first item all caps + $(replacement).text($(replacement).text().toUpperCase()); + break; + case 1: + case 3: + // Delete the second and fourth items + replacement = null; + break; + case 2: + // Make two of the third item and add some text + replacement = [replacement, $("
  • ").get(0)]; + $(replacement[0]).append(" - A"); + $(replacement[1]).append("Extra - B"); } // Replacement will be a dom element, null, diff --git a/types/jquery/v2/jquery-tests.ts b/types/jquery/v2/jquery-tests.ts index 4b6fc4e0db..d00c075125 100644 --- a/types/jquery/v2/jquery-tests.ts +++ b/types/jquery/v2/jquery-tests.ts @@ -2215,8 +2215,8 @@ function test_hide() { $("p").hide("slow"); }); $("#hidr").click(function () { - $("span:last-child").hide("fast", function () { - $(this).prev().hide("fast", arguments.callee); + $("span:last-child").hide("fast", function f() { + $(this).prev().hide("fast", f); }); }); $("#showr").click(function () { @@ -3126,20 +3126,21 @@ function test_map() { }).get().join(", ")); var mappedItems = $("li").map(function (index) { var replacement:any = $("
  • ").text($(this).text()).get(0); - if (index === 0) { - - // Make the first item all caps - $(replacement).text($(replacement).text().toUpperCase()); - } else if (index === 1 || index === 3) { - - // Delete the second and fourth items - replacement = null; - } else if (index === 2) { - - // Make two of the third item and add some text - replacement = [replacement, $("
  • ").get(0)]; - $(replacement[0]).append(" - A"); - $(replacement[1]).append("Extra - B"); + switch (index) { + case 0: + // Make the first item all caps + $(replacement).text($(replacement).text().toUpperCase()); + break; + case 1: + case 3: + // Delete the second and fourth items + replacement = null; + break; + case 2: + // Make two of the third item and add some text + replacement = [replacement, $("
  • ").get(0)]; + $(replacement[0]).append(" - A"); + $(replacement[1]).append("Extra - B"); } // Replacement will be a dom element, null, diff --git a/types/knuddels-userapps-api/tslint.json b/types/knuddels-userapps-api/tslint.json index 67eb97841e..3c7d3fe9c7 100644 --- a/types/knuddels-userapps-api/tslint.json +++ b/types/knuddels-userapps-api/tslint.json @@ -3,6 +3,8 @@ "rules": { // TODOs "no-mergeable-namespace": false, - "no-unnecsesary-class": false + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-unnecessary-class": false } } diff --git a/types/markerclustererplus/index.d.ts b/types/markerclustererplus/index.d.ts index 3277d1ba64..1485971e4c 100644 --- a/types/markerclustererplus/index.d.ts +++ b/types/markerclustererplus/index.d.ts @@ -85,7 +85,6 @@ declare class ClusterIcon extends google.maps.OverlayView { /** * A cluster icon. * - * @extends google.maps.OverlayView * @param cluster The cluster with which the icon is to be associated. * @param [styles] An array of {@link ClusterIconStyle} defining the cluster icons * to use for various cluster sizes. @@ -378,7 +377,6 @@ interface MarkerClustererOptions { declare class MarkerClusterer extends google.maps.OverlayView { /** * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}. - * @extends google.maps.OverlayView * @param map The Google map to attach to. * @param [markers] The markers to be added to the cluster. * @param [options] The optional parameters. diff --git a/types/restify-plugins/index.d.ts b/types/restify-plugins/index.d.ts index 05a289c529..7a9155d5fa 100644 --- a/types/restify-plugins/index.d.ts +++ b/types/restify-plugins/index.d.ts @@ -14,9 +14,6 @@ export namespace pre { */ function context(): RequestHandler; - /** - * - */ function dedupeSlashes(): RequestHandler; /** @@ -73,9 +70,6 @@ export interface AuditLoggerOptions { */ printLog?: boolean; - /** - * - */ body?: boolean; } @@ -165,14 +159,8 @@ export interface BodyParserOptions { */ rejectUnknown?: boolean; - /** - * - */ reviver?: any; - /** - * - */ maxFieldsSize?: number; } @@ -342,9 +330,6 @@ export interface MetricsCallback { */ err: Error; - /** - * - */ metrics: MetricsCallbackOptions; req: Request;