Skip to content

Commit 5bf5228

Browse files
author
Andy
authored
Fix additional lint errors from the new dtslint (DefinitelyTyped#15865)
1 parent e50f887 commit 5bf5228

File tree

10 files changed

+15
-31
lines changed

10 files changed

+15
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ If a `tslint.json` turns rules off, this is because that hasn't been fixed yet.
161161
"extends": "dtslint/dt.json",
162162
"rules": {
163163
// This package uses the Function type, and it will take effort to fix.
164-
"forbidden-types": false
164+
"ban-types": false
165165
}
166166
}
167167
```

types/algebra.js/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ declare class Variable {
1616
toString(): string;
1717
}
1818

19-
declare type Union = string | number | algebra.js.Fraction | Term;
19+
type Union = string | number | algebra.js.Fraction | Term;
2020

2121
declare namespace algebra.js {
2222
function parse(input: string): Equation | Expression;

types/csvtojson/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ declare namespace csvtojson {
235235
* @param {Function} listener listener function
236236
* @return {this} returns this object for chaining
237237
*/
238-
// tslint:disable-next-line:forbidden-types
238+
// tslint:disable-next-line ban-types
239239
on(event: string, listener: Function | JsonEventHandler | CsvEventHandler | DataEventHandler | ErrorEventHandler
240240
| RecordParsedEventHandler | EndEventHandler | EndParsedEventHandler | DoneEventHandler): this;
241241

types/ej.web.all/tslint.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
{
2-
<<<<<<< HEAD
3-
"extends": "../tslint.json",
4-
"rules": {
5-
"comment-format": false,
6-
"no-consecutive-blank-lines": false,
7-
"no-padding": false,
8-
"strict-export-declare-modifiers": false
9-
}
10-
=======
112
"extends": "dtslint/dt.json",
123
"rules": {
134
"comment-format": false,
145
"no-consecutive-blank-lines": false,
156
"no-padding": false,
167
"strict-export-declare-modifiers": false
178
}
18-
>>>>>>> master
199
}

types/mithril-global/tslint.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
2-
"extends": "../tslint.json",
2+
"extends": "dtslint/dt.json",
33
"rules": {
44
"array-type": [false, "array"],
55
"quotemark": [false, "double"],
66
"semicolon": [false, "always"],
77
"space-before-function-paren": [false, "always"],
88
"max-line-length": [false, 200],
99
"no-empty-interface": false,
10-
"no-redundant-modifiers": false,
10+
"no-reference-import": false,
1111
"only-arrow-functions": [false],
1212
"prefer-for-of": false,
13+
"strict-export-declare-modifiers": false,
1314
"unified-signatures": false,
1415
"whitespace": [
1516
false,

types/react-ga/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for react-ga 2.1.2
1+
// Type definitions for react-ga 2.1
22
// Project: https://github.com/react-ga/react-ga
33
// Definitions by: Tim Aldridge <https://github.com/telshin>
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

types/react-native/index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4709,7 +4709,6 @@ export interface SystraceStatic {
47094709
*/
47104710
measureMethods(object: any, objectName: string, methodNames: Array<string>): void
47114711

4712-
// tslint:disable:forbidden-types
47134712
/**
47144713
* Returns an profiled version of the input function. For example, you can:
47154714
* JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse);
@@ -4720,7 +4719,6 @@ export interface SystraceStatic {
47204719
* @return {function} replacement function
47214720
*/
47224721
measure<T extends Function>(objName: string, fnName: string, func: T): T
4723-
// tslint:enable:forbidden-types
47244722
}
47254723

47264724
/**

types/react-router-redux/v4/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ export interface RouterAction extends Action {
2323
payload?: LocationActionPayload;
2424
}
2525

26-
type LocationAction = (nextLocation: LocationDescriptor) => RouterAction;
27-
type GoAction = (n: number) => RouterAction;
28-
type NavigateAction = () => RouterAction;
26+
export type LocationAction = (nextLocation: LocationDescriptor) => RouterAction;
27+
export type GoAction = (n: number) => RouterAction;
28+
export type NavigateAction = () => RouterAction;
2929

3030
export const push: LocationAction;
3131
export const replace: LocationAction;
3232
export const go: GoAction;
3333
export const goBack: NavigateAction;
3434
export const goForward: NavigateAction;
3535

36-
interface RouteActions {
36+
export interface RouteActions {
3737
push: typeof push;
3838
replace: typeof replace;
3939
go: typeof go;
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
{
2-
"extends": "dtslint/dt.json",
3-
"rules": {
4-
"forbidden-types": false
5-
}
6-
}
1+
{ "extends": "dtslint/dt.json" }

types/react-router/v3/lib/match.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { Basename, History, LocationDescriptor } from "history";
22
import { ParseQueryString, RouteConfig, StringifyQuery } from "react-router";
33

4-
interface MatchArgs {
4+
export interface MatchArgs {
55
routes: RouteConfig;
66
basename?: Basename;
77
parseQueryString?: ParseQueryString;
88
stringifyQuery?: StringifyQuery;
99
}
1010

11-
interface MatchLocationArgs extends MatchArgs {
11+
export interface MatchLocationArgs extends MatchArgs {
1212
location: LocationDescriptor;
1313
history?: History;
1414
}
1515

16-
interface MatchHistoryArgs extends MatchArgs {
16+
export interface MatchHistoryArgs extends MatchArgs {
1717
location?: LocationDescriptor;
1818
history: History;
1919
}

0 commit comments

Comments
 (0)