Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript errors aren't being reported #205

Closed
paarthenon opened this issue Apr 21, 2017 · 5 comments
Closed

Typescript errors aren't being reported #205

paarthenon opened this issue Apr 21, 2017 · 5 comments

Comments

@paarthenon
Copy link

  • [x ] I have read the contribution documentation for this project.
  • [x ] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Hello,

In adapting one of my projects to use electron-forge I noticed I wasn't receiving compile errors when I should be. Exploring the issue I found that projects created with the react-typescript template do not throw any kind of compile errors for typescript code through electron-forge start or electron-forge lint or even electron-forge make.

I've got a test repository here that shows this in action. This repository was created using

electron-forge init --template=react-typescript

I've deliberately introduced compile errors by adding the line

const four:number = 'four';

to both the src/app.tsx and src/index.ts. These errors are never reported.

I've posted this issue here because I'm unfamiliar with the project and don't know if this is relevant to the forge cli tool or its react-typescript template. If this needs to be resubmitted elsewhere please let me know.

@MarshallOfSound
Copy link
Member

See this comment on electron-forge-templates 👍

electron-userland/electron-forge-templates#27 (comment)

@MarshallOfSound
Copy link
Member

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.

@paarthenon
Copy link
Author

@MarshallOfSound fair. But if I do actually want to see my compile errors without manually opening each file what option do I have with forge?

@MarshallOfSound
Copy link
Member

@paarthenon You can use tslint with the --type-check option enabled 👍

@anaisbetts
Copy link
Contributor

@paarthenon I'd just set up your lint task to run tsc on the whole project

dsanders11 pushed a commit that referenced this issue Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants