Commit Graph

26 Commits

Author SHA1 Message Date
Sean Zhu
b19bffe110 Remove error for @typescript-eslint/no-namespace (#7803)
Declare namespaces are supported by babel now, and babel will throw with a nice error message for non-declare namespaces, so this rule is unnecessary. Closes #7651.
2019-12-06 14:44:22 -06:00
Ian Schmitz
1a66971f9e Bump dependencies (#8024) 2019-11-24 15:48:15 -08:00
Ian Schmitz
211694a8a2 Fix CI (#7951) 2019-11-08 18:54:16 -08:00
Justin Grant
85aac9b9d5 Stop hiding the column number of ESLint errors (#6980) 2019-10-01 09:23:23 -07:00
Ian Schmitz
7b196fa4d6 Add Azure DevOps build pipeline (#7096) 2019-05-28 19:12:22 -07:00
Ian Sutherland
e831b6b1fa Add test to make sure .d.ts files are ignored when checking for TypeScript project (#6858) 2019-05-21 10:32:52 -06:00
Robert van Steen
e7a2d6168a Set baseUrl from jsconfig.json/tsconfig.json (#6656)
* Set baseUrl from jsconfig.json/tsconfig.json

* Resolve the path for loading modules

* Add tests for jsconfig.json

* Add jsconfig.json

* Update packages/react-scripts/scripts/start.js

* Move baseUrl test to config folder

* Remove alias test

* Use chalk from react-dev-utils

* Add lost absolute file for typescript baseUrl test

* Update packages/react-scripts/config/modules.js

* Update other references of useTypeScript to hasTsConfig

* Fix casing of TypeScript

* Keep respecting NODE_PATH for now to support multiple module paths.

* Add test for NODE_PATH

* Add fallback if NODE_PATH is not set.

* Fix node path behavior tests

* Remove debugging code from behavior test suite

* Remove more debugging code

* Show NODE_PATH deprecation warning during build


Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
Co-authored-by: Brody McKee <mrmckeb@users.noreply.github.com>
Co-authored-by: Jack Zhao <jzhao@fb.com>
2019-04-16 15:08:24 -06:00
Ian Schmitz
3c9c21a285 Upgrade dependencies (#6614)
* Upgrade dependencies

* Upgrade a couple missed deps

* Run Prettier over codebase
2019-03-11 20:45:14 -06:00
Ian Sutherland
1548a0a92e Reapply "Speed up TypeScript v2 (#6406)" (#6586)
This reverts commit b2cf28b7f1 and reapplies #6406.
2019-03-06 17:46:38 -07:00
Ian Sutherland
b2cf28b7f1 Revert "Speed up TypeScript v2 (#6406)" (#6585)
This reverts commit 6a5b3cdaaa.
2019-03-06 17:33:17 -07:00
Ian Schmitz
6a5b3cdaaa Speed up TypeScript v2 (#6406)
* Revert "Revert "Speed up TypeScript projects (#5903)""

This reverts commit 544a5943ce.

* Move fork-ts-checker dep to react-dev-utils

* Convert WebpackDevServerUtils.createCompiler to take in options arg

* Update README.md for react-dev-utils
2019-02-18 16:31:44 -08:00
Ian Schmitz
544a5943ce Revert "Speed up TypeScript projects (#5903)"
This reverts commit 5ce09db2b3.
2019-02-11 08:10:33 -08:00
Tomáš Szabo
5ce09db2b3 Speed up TypeScript projects (#5903)
As a lot of [people](https://hackernoon.com/why-i-no-longer-use-typescript-with-react-and-why-you-shouldnt-either-e744d27452b4) is complaining about TypeScript performance in CRA, I decided to enable `async` mode in TypeScript checker.

These changes basically brings the JS compilation times to TS projects. So, recompilation took less than 1 second instead of 3 seconds in medium size project.

The problem with async mode is that type-errors are reported after Webpack ends up recompilation as TypeScript could be slower than Babel. PR allows to emit files compiled by Babel immediately and then wait for TS and show type errors in terminal later. Also, if there was no compilation errors and any type error occurs, we trigger a hot-reload with new errors to show error overlay in browser.

Also, I wanted to start a discussion about `skipLibCheck: false` option in default `tsconfig.json`. This makes recompilations really slow and we should consider to set it to `true` or at least give users a big warning to let them know that it could be really slow.

The following video is showing the updated workflow with a forced 2.5 second delay for type-check to give you an idea how it works.

![nov-26-2018 15-47-01](https://user-images.githubusercontent.com/5549148/49021284-9446fe80-f192-11e8-952b-8f83d77d5fbc.gif)


I'm pretty sure that PR needs some polishing and improvements but it should works as it is. Especially a "hack" with reloading the browser after type-check looks ugly to me.

cc @brunolemos as he is an initiator of an original TypeScript PR.

Should fix https://github.com/facebook/create-react-app/issues/5820
2019-02-07 19:34:52 -08:00
Matthew Holloway
fd382772a1 Ignore node_modules in verifyNoTypeScript (#6022) 2019-01-14 13:54:46 +02:00
Ian Schmitz
c8a540d9a1 Add react/react-dom dependencies to relative-paths test fixture (#6165) 2019-01-10 21:17:09 -08:00
Sibiraj
85a8a22513 Run prettier on HTML files (#5839) 2018-11-22 23:41:10 -05:00
Joe Haddad
c355f772be Fix propertyDecorator test 2018-11-21 23:42:51 -05:00
Joe Haddad
be75601196 Fix annotated var test 2018-11-21 22:33:48 -05:00
Ian Schmitz
445a56dab4 Fix TypeScript decorator support (#5783)
* Fix TypeScript decorator support

* Update babel flow override

* WIP
2018-11-21 21:57:25 -05:00
Joe Haddad
1a8003dbdc Add support for decorators (#5659)
* Turn on decorators

* Add decorator test
2018-10-31 23:08:52 -04:00
Joe Haddad
0481ae8178 Fix tests x2 2018-10-24 18:37:15 -04:00
Joe Haddad
82052a53b6 Fix tests 2018-10-24 18:35:47 -04:00
Joe Haddad
5ead915b73 Automatically setup TypeScript when detected (#5549)
* Don't resolve TS files if it's not detected in the project

* Automatically create tsconfig.json file for user

* Remove always false check

* Add missing file

* Don't filter paths too early
2018-10-24 00:59:26 -04:00
Joe Haddad
b8198b7a3c Add an advanced typescript test case 2018-10-22 11:26:05 -04:00
Bruno Lemos
88aef1100f TypeScript syntax support (#4837) 2018-10-21 12:03:26 -04:00
Joe Haddad
5fecfee237 Clean up the behavior tests (#5365)
* Speed up installs with pnp

* Move to a better relative path test

* Continue work on new test organization

* Move mjs test to new enhanced tests

* Move over last legacy test

* Update behavior e2e script

* Add first iteration of instructions to test readme

* Add some more bad instructions

* Split test command into multiple lines

* Use two workers (do not run in band)

* Bump install timeout

* No global pollution

* Fix PnP support via standard run mechanism

* Prevent circular serve command

* Silent yarn execs

* Fix common commands by using a shell

* Run with npx instead of Yarn

* Remove unused scripts

* Wait for localhost and fix script booting with PnP

* Don't pnp locally because links will cause module resolution to whine

* lint-staged is annoying

* Strip Yarn out of execa runs

* Set default license if none specified

* Don't impose worker limit

* Disable pnp for webpack messages

* Add missing dependency

* Disable timeout and rely on Jest

* Only use 2 jest workers

* Add missing dependency
2018-10-10 11:05:15 -04:00