Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit c25810e

Browse files
committed
fixes
1 parent 4d41f06 commit c25810e

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// https://github.com/typescript-eslint/typescript-eslint/blob/5b0b3d9edbcb3ab588a34c431037d9deece30824/packages/eslint-plugin/docs/rules/indent.md#options
1414
"@typescript-eslint/indent": ["error", 2],
1515
"import/no-extraneous-dependencies": ["error", {
16-
"devDependencies": ["**/*.spec.*"]
16+
"devDependencies": ["**/*.spec.*", "src/setupTests.tsx"]
1717
}
1818
],
1919
// We use `.tsx` instead of `.jsx` for files with JSX inside.

src/@types/react-diff-view/index.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint amo/only-tsx-files: 0, @typescript-eslint/no-unused-vars: 0 */
2+
13
declare module 'react-diff-view' {
24
type ChangeType = 'delete' | 'insert' | 'normal';
35

@@ -13,7 +15,7 @@ declare module 'react-diff-view' {
1315
};
1416

1517
type HunkInfo = {
16-
changes: Array<ChangeInfo>;
18+
changes: ChangeInfo[];
1719
content: string;
1820
isPlain: boolean;
1921
newLines: number;
@@ -22,7 +24,7 @@ declare module 'react-diff-view' {
2224
oldStart: number;
2325
};
2426

25-
type Hunks = Array<HunkInfo>;
27+
type Hunks = HunkInfo[];
2628

2729
type DiffInfo = {
2830
oldPath: string;
@@ -37,7 +39,7 @@ declare module 'react-diff-view' {
3739
type: string;
3840
};
3941

40-
function parseDiff(text: string, options?: object): Array<DiffInfo>;
42+
function parseDiff(text: string, options?: object): DiffInfo[];
4143

4244
type ViewType = 'split' | 'unified';
4345

src/react-app-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/* eslint amo/only-tsx-files: 0, spaced-comment: 0 */
12
/// <reference types="react-scripts" />

src/setupTests.ts renamed to src/setupTests.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ configure({ adapter: new Adapter() });
77

88
// See: https://github.com/jefflau/jest-fetch-mock/tree/07cf149688b6738e0a45864626ba47793d04da23#typescript-guide
99
const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock;
10+
1011
customGlobal.fetch = require('jest-fetch-mock');
12+
1113
customGlobal.fetchMock = customGlobal.fetch;
1214

1315
beforeEach(() => {
14-
fetchMock.resetMocks();
16+
customGlobal.fetchMock.resetMocks();
1517
});

0 commit comments

Comments
 (0)