Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Typescript via react-scripts #48

Merged
merged 24 commits into from
Nov 24, 2018
Merged

Typescript via react-scripts #48

merged 24 commits into from
Nov 24, 2018

Conversation

MikelArnaiz
Copy link
Collaborator

@MikelArnaiz MikelArnaiz commented Nov 23, 2018

This PR removes react-scripts-ts and adds typescript support with the official react-scripts.

Besides

  • Updates some dependencies to make it work
  • Updates snapshots
  • Fixes some compiling / type errors (but skips some others with any)

PS: if you have errors running the tests it is a [know NPM issue}(https://github.com/facebook/create-react-app/issues/5259).

Followed https://vincenttunru.com/migrate-create-react-app-typescript-to-create-react-app/

Update

For the same npm issue described above, Travis was not passing, therefore this PR will ensure that you use Yarn for package manager

Copy link
Member

@mvdam mvdam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! We will fix the anys later 👍 Good to see the fork go!

"nuka-carousel": "^4.2.5",
"prettier": "^1.10.2",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-ga": "^2.5.3",
"react-i18next": "^7.7.0",
"react-router-dom": "^4.2.2",
"react-scripts-ts": "https://github.com/code-star/create-react-app-typescript.git#build",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@@ -61,6 +61,6 @@ const Events: SFC<IEventInnerProps & IEventOuterProps> = ({
);
};

export default compose<IEventInnerProps, IEventOuterProps>(
export default compose<IEventInnerProps & IEventOuterProps, IEventOuterProps>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

.gitignore Outdated
@@ -26,8 +26,8 @@ yarn-error.log*
# Serverless directories
.serverless

# Do not use yarn
yarn.lock
# Do not npm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"use"

@mdvanes
Copy link
Member

mdvanes commented Nov 24, 2018

I do want to note I am getting this runtime error:

index.js:1452 Warning: Material-UI: you are using the deprecated typography variants that will be removed in the next major release.
Please read the migration guide under https://material-ui.com/style/typography#migration-to-typography-v2
function.console.(anonymous function) @ index.js:1452
printWarning @ warning.js:34
warning @ warning.js:58
createTypography @ createTypography.js:55
createMuiTheme @ createMuiTheme.js:66
./src/codestarMuiTheme.js @ codestarMuiTheme.js:3
__webpack_require__ @ bootstrap:787
fn @ bootstrap:150
./src/App.jsx @ index.css:8
__webpack_require__ @ bootstrap:787
fn @ bootstrap:150
./src/index.tsx @ index.css?02e3:45
__webpack_require__ @ bootstrap:787
fn @ bootstrap:150
0 @ registerServiceWorker.js:117
__webpack_require__ @ bootstrap:787
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ main.chunk.js:1
index.js:1452 Warning: Failed prop type: The `raised` variant will be removed in the next major release. `contained` is equivalent and should be used instead.
    in Button (created by WithStyles(Button)))

@mdvanes mdvanes added the do not merge do not merge label Nov 24, 2018
@mdvanes
Copy link
Member

mdvanes commented Nov 24, 2018

I am also getting an enormous amount of TS errors in the IDE, but not in the build: e.g. in About.tsx

TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.

@mdvanes mdvanes merged commit c2dffc1 into test Nov 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do not merge do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants