Fix additional lint errors from the new dtslint (#15865)

This commit is contained in:
Andy 2017-04-14 09:15:37 -07:00 committed by GitHub
parent e50f8878a5
commit 5bf5228d71
10 changed files with 15 additions and 31 deletions

View File

@ -161,7 +161,7 @@ If a `tslint.json` turns rules off, this is because that hasn't been fixed yet.
"extends": "dtslint/dt.json",
"rules": {
// This package uses the Function type, and it will take effort to fix.
"forbidden-types": false
"ban-types": false
}
}
```

View File

@ -16,7 +16,7 @@ declare class Variable {
toString(): string;
}
declare type Union = string | number | algebra.js.Fraction | Term;
type Union = string | number | algebra.js.Fraction | Term;
declare namespace algebra.js {
function parse(input: string): Equation | Expression;

View File

@ -235,7 +235,7 @@ declare namespace csvtojson {
* @param {Function} listener listener function
* @return {this} returns this object for chaining
*/
// tslint:disable-next-line:forbidden-types
// tslint:disable-next-line ban-types
on(event: string, listener: Function | JsonEventHandler | CsvEventHandler | DataEventHandler | ErrorEventHandler
| RecordParsedEventHandler | EndEventHandler | EndParsedEventHandler | DoneEventHandler): this;

View File

@ -1,13 +1,4 @@
{
<<<<<<< HEAD
"extends": "../tslint.json",
"rules": {
"comment-format": false,
"no-consecutive-blank-lines": false,
"no-padding": false,
"strict-export-declare-modifiers": false
}
=======
"extends": "dtslint/dt.json",
"rules": {
"comment-format": false,
@ -15,5 +6,4 @@
"no-padding": false,
"strict-export-declare-modifiers": false
}
>>>>>>> master
}

View File

@ -1,5 +1,5 @@
{
"extends": "../tslint.json",
"extends": "dtslint/dt.json",
"rules": {
"array-type": [false, "array"],
"quotemark": [false, "double"],
@ -7,9 +7,10 @@
"space-before-function-paren": [false, "always"],
"max-line-length": [false, 200],
"no-empty-interface": false,
"no-redundant-modifiers": false,
"no-reference-import": false,
"only-arrow-functions": [false],
"prefer-for-of": false,
"strict-export-declare-modifiers": false,
"unified-signatures": false,
"whitespace": [
false,

View File

@ -1,4 +1,4 @@
// Type definitions for react-ga 2.1.2
// Type definitions for react-ga 2.1
// Project: https://github.com/react-ga/react-ga
// Definitions by: Tim Aldridge <https://github.com/telshin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

View File

@ -4709,7 +4709,6 @@ export interface SystraceStatic {
*/
measureMethods(object: any, objectName: string, methodNames: Array<string>): void
// tslint:disable:forbidden-types
/**
* Returns an profiled version of the input function. For example, you can:
* JSON.parse = Systrace.measure('JSON', 'parse', JSON.parse);
@ -4720,7 +4719,6 @@ export interface SystraceStatic {
* @return {function} replacement function
*/
measure<T extends Function>(objName: string, fnName: string, func: T): T
// tslint:enable:forbidden-types
}
/**

View File

@ -23,9 +23,9 @@ export interface RouterAction extends Action {
payload?: LocationActionPayload;
}
type LocationAction = (nextLocation: LocationDescriptor) => RouterAction;
type GoAction = (n: number) => RouterAction;
type NavigateAction = () => RouterAction;
export type LocationAction = (nextLocation: LocationDescriptor) => RouterAction;
export type GoAction = (n: number) => RouterAction;
export type NavigateAction = () => RouterAction;
export const push: LocationAction;
export const replace: LocationAction;
@ -33,7 +33,7 @@ export const go: GoAction;
export const goBack: NavigateAction;
export const goForward: NavigateAction;
interface RouteActions {
export interface RouteActions {
push: typeof push;
replace: typeof replace;
go: typeof go;

View File

@ -1,6 +1 @@
{
"extends": "dtslint/dt.json",
"rules": {
"forbidden-types": false
}
}
{ "extends": "dtslint/dt.json" }

View File

@ -1,19 +1,19 @@
import { Basename, History, LocationDescriptor } from "history";
import { ParseQueryString, RouteConfig, StringifyQuery } from "react-router";
interface MatchArgs {
export interface MatchArgs {
routes: RouteConfig;
basename?: Basename;
parseQueryString?: ParseQueryString;
stringifyQuery?: StringifyQuery;
}
interface MatchLocationArgs extends MatchArgs {
export interface MatchLocationArgs extends MatchArgs {
location: LocationDescriptor;
history?: History;
}
interface MatchHistoryArgs extends MatchArgs {
export interface MatchHistoryArgs extends MatchArgs {
location?: LocationDescriptor;
history: History;
}