From 64a8b9c2f30922d362028d9c6a31543c1874d1c7 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 4 Dec 2020 11:34:48 -0700 Subject: [PATCH] chore: update all deps (#842) --- package.json | 9 ++++----- src/__tests__/rerender.js | 4 ++-- types/test.tsx | 4 ++-- types/tsconfig.json | 20 ++------------------ types/tslint.json | 9 --------- 5 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 types/tslint.json diff --git a/package.json b/package.json index 79726397..d1d6aa36 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "setup": "npm install && npm run validate -s", "test": "kcd-scripts test", "test:update": "npm test -- --updateSnapshot --coverage", - "typecheck": "dtslint ./types/", + "typecheck": "kcd-scripts typecheck --build types", "validate": "kcd-scripts validate" }, "files": [ @@ -48,15 +48,14 @@ }, "devDependencies": { "@testing-library/jest-dom": "^5.11.6", - "@types/react-dom": "^16.9.9", + "@types/react-dom": "^17.0.0", "dotenv-cli": "^4.0.0", - "dtslint": "4.0.5", - "kcd-scripts": "^7.0.3", + "kcd-scripts": "^7.5.1", "npm-run-all": "^4.1.5", "react": "^17.0.1", "react-dom": "^17.0.1", "rimraf": "^3.0.2", - "typescript": "^4.0.5" + "typescript": "^4.1.2" }, "peerDependencies": { "react": "*", diff --git a/src/__tests__/rerender.js b/src/__tests__/rerender.js index f8ea377e..be3c259c 100644 --- a/src/__tests__/rerender.js +++ b/src/__tests__/rerender.js @@ -23,9 +23,9 @@ test('hydrate will not update props until next render', () => { hydrate: true, }) - expect(initialInputElement.value).toBe(firstValue) + expect(initialInputElement).toHaveValue(firstValue) const secondValue = 'goodbye' rerender( null} />) - expect(initialInputElement.value).toBe(secondValue) + expect(initialInputElement).toHaveValue(secondValue) }) diff --git a/types/test.tsx b/types/test.tsx index 07c4dbb7..1366caac 100644 --- a/types/test.tsx +++ b/types/test.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -import {render, fireEvent, screen, waitFor} from '@testing-library/react' -import * as pure from '@testing-library/react/pure' +import {render, fireEvent, screen, waitFor} from '.' +import * as pure from './pure' export async function testRender() { const page = render(
) diff --git a/types/tsconfig.json b/types/tsconfig.json index aeacacb0..a7829065 100644 --- a/types/tsconfig.json +++ b/types/tsconfig.json @@ -1,20 +1,4 @@ -// this additional tsconfig is required by dtslint -// see: https://github.com/Microsoft/dtslint#typestsconfigjson { - "compilerOptions": { - "module": "commonjs", - "lib": ["es6", "dom"], - "jsx": "react", - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "noEmit": true, - "baseUrl": ".", - "skipLibCheck": true, - "paths": { - "@testing-library/react": ["."], - "@testing-library/react/pure": ["."] - } - } + "extends": "../node_modules/kcd-scripts/shared-tsconfig.json", + "include": ["."] } diff --git a/types/tslint.json b/types/tslint.json deleted file mode 100644 index cb0fce9f..00000000 --- a/types/tslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ["dtslint/dtslint.json"], - "rules": { - "no-useless-files": false, - "no-relative-import-in-test": false, - "semicolon": false, - "whitespace": false - } -}