Skip to content

Commit 9c8c659

Browse files
committed
Enable noUnusedLocals for type checking test files
1 parent 50ca7f8 commit 9c8c659

File tree

6 files changed

+23
-30
lines changed

6 files changed

+23
-30
lines changed

test/unit/esm-interpolate/esm-interpolate.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { renderToString } from 'react-dom/server'
32
import * as nextRouter from 'next/router'
43

test/unit/esm-interpolate/fixture.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import { useRouter } from 'next/router'
32

43
export const Foo = () => {

test/unit/link-warnings.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
import { act, render } from '@testing-library/react'
55
import Link from 'next/link'
6-
import React from 'react'
76

87
describe('<Link/>', () => {
98
let spy

test/unit/next-dynamic.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* @jest-environment jsdom
33
*/
4-
import React from 'react'
54
import { act, render } from '@testing-library/react'
65
import dynamic from 'next/dynamic'
76

tsconfig.base.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

tsconfig.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
{
2-
"extends": "./tsconfig.base.json",
3-
"include": ["test/**/*.test.ts", "test/**/*.test.tsx"],
4-
"exclude": ["node_modules"]
2+
"compilerOptions": {
3+
"allowJs": true,
4+
"esModuleInterop": true,
5+
"jsx": "react-jsx",
6+
"module": "esnext",
7+
"moduleResolution": "node",
8+
"noEmit": true,
9+
"noUnusedLocals": true,
10+
"paths": {
11+
"amp-test-utils": ["./test/lib/amp-test-utils"],
12+
"development-sandbox": ["./test/lib/development-sandbox"],
13+
"e2e-utils": ["./test/lib/e2e-utils"],
14+
"next-test-utils": ["./test/lib/next-test-utils"],
15+
"next-webdriver": ["./test/lib/next-webdriver"],
16+
"test-data-service/*": ["./test/lib/test-data-service/*"],
17+
"test-log": ["./test/lib/test-log"]
18+
},
19+
"resolveJsonModule": true,
20+
"strict": false,
21+
"target": "ESNext",
22+
"types": ["react", "jest", "node", "trusted-types", "jest-extended"]
23+
},
24+
"include": ["test/**/*.test.ts", "test/**/*.test.tsx"]
525
}

0 commit comments

Comments
 (0)