Enable eslint import checks and fixed the reported errors (#878)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/878 1) Enabled eslint error reporting for unresolved imports and fixed all the errors 2) Enabled eslint for typings (d.ts) and fixed all the errors Reviewed By: passy Differential Revision: D20335151 fbshipit-source-id: 7b142281a406b32df0f02a5cd0d7d05eba941acd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
85c13bb1f3
commit
beb5c85e69
6
desktop/types/ansi-to-html.d.ts
vendored
6
desktop/types/ansi-to-html.d.ts
vendored
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
declare module 'ansi-to-html' {
|
||||
export default class Filter {
|
||||
toHtml: (input: string) => string;
|
||||
}
|
||||
export default class Filter {
|
||||
toHtml: (input: string) => string;
|
||||
}
|
||||
}
|
||||
|
||||
19
desktop/types/line-replace.d.ts
vendored
19
desktop/types/line-replace.d.ts
vendored
@@ -8,11 +8,16 @@
|
||||
*/
|
||||
|
||||
declare module 'line-replace' {
|
||||
export default function(args: {
|
||||
file: string;
|
||||
line: number;
|
||||
text: string;
|
||||
addNewLine: boolean;
|
||||
callback: (args: {file: string; line: number; replacedText: string; text: string}) => void;
|
||||
}): void;
|
||||
export default function(args: {
|
||||
file: string;
|
||||
line: number;
|
||||
text: string;
|
||||
addNewLine: boolean;
|
||||
callback: (args: {
|
||||
file: string;
|
||||
line: number;
|
||||
replacedText: string;
|
||||
text: string;
|
||||
}) => void;
|
||||
}): void;
|
||||
}
|
||||
|
||||
10
desktop/types/metro-resolver.d.tsx
Normal file
10
desktop/types/metro-resolver.d.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
declare module 'metro-resolver';
|
||||
10
desktop/types/metro.d.ts
vendored
Normal file
10
desktop/types/metro.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
declare module 'metro';
|
||||
34
desktop/types/npm-api.d.ts
vendored
34
desktop/types/npm-api.d.ts
vendored
@@ -9,30 +9,28 @@
|
||||
|
||||
// Very incomplete stub with only the methods we use defined.
|
||||
declare module 'npm-api' {
|
||||
export default class NpmApi {
|
||||
constructor(...args: any[]);
|
||||
export default class NpmApi {
|
||||
constructor(...args: any[]);
|
||||
|
||||
list(...args: any[]): any;
|
||||
list(...args: any[]): any;
|
||||
|
||||
maintainer(...args: any[]): any;
|
||||
maintainer(...args: any[]): any;
|
||||
|
||||
repo(name: string): Repository;
|
||||
repo(name: string): Repository;
|
||||
|
||||
reset(...args: any[]): any;
|
||||
reset(...args: any[]): any;
|
||||
|
||||
use(...args: any[]): any;
|
||||
use(...args: any[]): any;
|
||||
|
||||
view(...args: any[]): any;
|
||||
view(...args: any[]): any;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Repository {
|
||||
package(): Promise<Package>;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
export class Repository {
|
||||
package(): Promise<Package>;
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user