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

`lint` task does not appear to work for the TypeScript templated projects #29

Closed nelsonjchen closed 5 years ago

nelsonjchen commented 7 years ago

Please describe your issue:

It doesn't appear the lint task work in the generated projects. For example, right away there's an issue with the curly rule warning not popping up for src/index.ts.

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem.

Run this:

electron-forge init foobar-project --template=react-typescript

Now open foobar-project/src/index.ts in something that's tslint aware like VS Code. You'll immediate see there's a linting error on about line 11, where there's no curly braces for the live reload check. That is, by the way, a separate issue.

Now run yarn lint or anything that runs the lint task. No lint warnings appears. If you go into either of the tsx or ts files and start putting stuff in them clearly out of style, the lint task will give no warnings. In fact, you can replace index.ts with the US constitution or anything that's not valid code and it won't be read either.

I think the issue is that the lint task resolves to tslint src and that does not appear to recursively lint .ts or .tsx files undernearth src. Running something explicit like yarn lint -- src/index.ts does get the linter to respond to the file on disk.

nelsonjchen commented 7 years ago

While #31 resolves the react-typescript situation, as mentioned in #31, another PR should be made against the angular 2 version too.

malept commented 7 years ago

It would be most helpful if someone more familiar with Angular 2 could make the PR.

malept commented 5 years ago

Closing, see https://github.com/electron-userland/electron-forge-templates/issues/66