Skip to content

Commit

Permalink
tooling: revert to React, React DOM & React scripts pre-React 17
Browse files Browse the repository at this point in the history
While it would be great to update to the latest version of React and all
its tooling, there seems to be an issue with typescript versions,
react-scripts and the new JSX transform wreaking havoc on the JSX
checks. While the issue was supposedly fixed here
(facebook/create-react-app#9869), upgrading to
react-scripts 4.0.1 doesn't fix the problem. Neither does upgrading AND
pinning typescript to 4.0.5 so it doesn't overwrite the tsconfig.json
file. Let's wait a few versions ahead for react-scripts so we can be
sure this is fixed.
  • Loading branch information
Evalir committed Dec 3, 2020
1 parent 2c70675 commit 184291f
Show file tree
Hide file tree
Showing 5 changed files with 2,209 additions and 2,053 deletions.
10 changes: 5 additions & 5 deletions packages/govern-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
"graphql": "^15.0.0",
"graphql-tag": "^2.10.3",
"is-ipfs": "^2.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-query": "^2.26.2",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.1",
"react-scripts": "3.4.4",
"react-spring": "^8.0.27",
"styled-components": "^5.1.0",
"token-amount": "^0.2.0",
"typescript": "^4.1.2",
"use-viewport": "^0.2.0",
"use-wallet": "^0.8.0",
"web3-eth-abi": "^1.3.0",
Expand Down Expand Up @@ -77,7 +78,6 @@
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-standard": "^4.0.1",
"prettier": "^2.0.5",
"typescript": "^4.1.2"
"prettier": "^2.0.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type ContainerEventResolve = {
id: string
container: any
createdAt: string
approved: Boolean
approved: boolean
}

type ContainerEventRule = {
Expand All @@ -92,7 +92,7 @@ type ContainerEventSubmitEvidence = {
createdAt: string
evidence: string
submitter: string
finished: Boolean
finished: boolean
}

type ContainerEventVeto = {
Expand Down
2 changes: 1 addition & 1 deletion packages/govern-console/src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function log(...params) {
export function log(...params: any[]) {
if (
process.env.NODE_ENV !== 'production' &&
process.env.NODE_ENV !== 'test'
Expand Down
18 changes: 12 additions & 6 deletions packages/govern-console/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"include": ["src"],
"compilerOptions": {
"target": "es5",
"jsx": "react",
"allowSyntheticDefaultImports": true,
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
"noEmit": true,
"jsx": "react"
},
"include": [
"src"
]
}
Loading

0 comments on commit 184291f

Please sign in to comment.