Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Option to lint entire workspace and/or to prevent running apps with tslint errors #38

Closed
justingrant opened this issue Dec 5, 2018 · 1 comment

Comments

@justingrant
Copy link

justingrant commented Dec 5, 2018

I just switched from create-react-app-typescript (which is now deprecated) to CRA 2.1.1 with TypeScript support. There are two gaps I'm trying to address.

I followed the VSCode setup instructions for create-react-app-typescript and it's working great to find lint errors in files that I'm currently editing. But I can't figure out how to lint my entire project, including files that aren't currently open in VSCode, whenever I load my workspace or change a file that might impact other files. Is there a way to do this by default?

The second thing I'm missing from other non-CRA projects is the ability to block npm start if there are lint errors. This comment from @WorldMaker pointed to typescript-tslint-plugin as the missing tslint support in CRA 2.x. Can typescript-tslint-plugin force CRA 2.x's npm start to report lint errors, just like it will for "compiler" errors that are caught by Babel?

@mjbvz
Copy link
Contributor

mjbvz commented Dec 13, 2018

This sounds like a good use case for a task: https://code.visualstudio.com/Docs/editor/tasks

The tslint-plugin-extension includes a task problem matcher you can use for a tslint task: https://github.com/Microsoft/vscode-typescript-tslint-plugin

@mjbvz mjbvz closed this as completed Dec 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants