Skip to content

Commit

Permalink
Remove TSDX
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Sep 10, 2020
1 parent 9e19f52 commit 5970994
Show file tree
Hide file tree
Showing 8 changed files with 1,583 additions and 3,299 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
]
};
11 changes: 10 additions & 1 deletion example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1790,11 +1790,20 @@ babel-plugin-dynamic-import-node@^2.3.3:
dependencies:
object.assign "^4.1.0"

babel-plugin-superjson-next@^0.1.3-danger-1599721110:
version "0.1.3"
resolved "https://registry.yarnpkg.com/babel-plugin-superjson-next/-/babel-plugin-superjson-next-0.1.3.tgz#282be863bce43660bd6aadf6440c3127d1388849"
integrity sha512-9OSkdLPkq2ovSnmiWaR1KuMuFEkQ0W8vfntrgyEXGj9kM0fzzX+30UXUnYRvAZ9SZHn62B6Fss9trJ2bDIVdkw==
dependencies:
"@babel/core" "^7.11.0"
"@babel/helper-module-imports" "^7.10.4"

"babel-plugin-superjson-next@file:..":
version "0.1.0"
version "0.1.3-danger-1599721110"
dependencies:
"@babel/core" "^7.11.0"
"@babel/helper-module-imports" "^7.10.4"
babel-plugin-superjson-next "^0.1.3-danger-1599721110"

babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
"scripts": {
"build": "tsc",
"test": "jest",
"prepare": "yarn build"
},
"peerDependencies": {
"next": "^9.5.1",
"react": "^16.13.1",
"superjson": "1.x"
"prepare": "yarn build",
"lint": "eslint"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
"pre-commit": "yarn lint"
}
},
"prettier": {
Expand All @@ -39,18 +35,22 @@
"@types/react": "^16.9.44",
"all-contributors-cli": "^6.17.0",
"babel-plugin-tester": "^9.2.0",
"eslint": "^7.8.1",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"jest": "^26.4.2",
"next": "^9.5.1",
"next": "^9.5.3",
"prettier": "^2.0.5",
"react": "^16.13.1",
"superjson": "^1.1.0",
"superjson": "^1.2.1",
"ts-jest": "^26.3.0",
"tsdx": "^0.13.2",
"tslib": "^2.0.0",
"typescript": "^3.9.7"
},
"peerDependencies": {
"next": "9.X",
"react": "16.X",
"superjson": "1.x"
},
"dependencies": {
"@babel/core": "^7.11.0",
"@babel/helper-module-imports": "^7.10.4"
Expand Down
4 changes: 2 additions & 2 deletions src/tools.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SuperJSON from 'superjson';
import type { GetServerSideProps } from 'next';
import React from 'react';
import * as React from 'react';

type SuperJSONResult = any;

Expand All @@ -19,7 +19,7 @@ export function withSuperJSONProps<P>(
export function withSuperJSONPage<P>(
Page: React.ComponentType<P>
): React.ComponentType<SuperJSONResult> {
return function WithSuperJSON(serializedProps) {
return function WithSuperJSON(serializedProps: any) {
const props = (SuperJSON.deserialize(serializedProps) as unknown) as P;
return <Page {...props} />;
};
Expand Down
18 changes: 4 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
{
"include": ["src", "test"],
"include": ["src"],
"compilerOptions": {
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./src",
"rootDir": "src",
"outDir": "dist",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
"*": ["src/*", "node_modules/*"]
},
"jsx": "react",
"esModuleInterop": true
"skipLibCheck": true
}
}
16 changes: 0 additions & 16 deletions tsdx.config.js

This file was deleted.

Loading

0 comments on commit 5970994

Please sign in to comment.