electron-userland / electron-forge-templates

Templates bundled with Electron Forge <= 5 to create Electron apps using popular JavaScript frameworks
107 stars 23 forks source link

TypeScript errors not displayed #27

Closed danielearwicker closed 7 years ago

danielearwicker commented 7 years ago

When I create a new project with:

electron-forge init my-new-project --template=react-typescript

It initially has a type error, because it requires electron-compile which doesn't yet have typings.

But when the project is run with electron-forge start the type errors don't get displayed anywhere. It just silently runs. Ideally the console should display type errors prominently.

Also the initially created project should not error - I've submitted a PR for embedded typings in electron-compile to try to resolve this.

anaisbetts commented 7 years ago

We don't actually want to stop the app from running even if there are type errors, the IDE and the linter can do the job of reporting type errors. This is hard because our compiler model doesn't take the entire project into account, or else we'd recompile the entire app for every file.

I would take a PR to the template to add typechecking as part of the lint step though, I think that's a Good Idea