Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Project not specified to tslint #126

Closed
pelotom opened this issue Aug 1, 2017 · 4 comments
Closed

Project not specified to tslint #126

pelotom opened this issue Aug 1, 2017 · 4 comments

Comments

@pelotom
Copy link
Contributor

pelotom commented Aug 1, 2017

When you first start a freshly-scaffolded app, the following warning flashes:

Warning: The 'no-use-before-declare' rule requires type infomation.

This is because --project is not being specified to tslint. It has the implication that any rules that require type information are disabled. In the ejected app's webpack config, adding

options: {
  typeCheck: true,
  tsConfigFile: paths.appTsConfig,
}

to the ts-loader config fixes it.

@wmonk
Copy link
Owner

wmonk commented Aug 4, 2017

I will accept a PR for this.

@carlpaten
Copy link

I would be interested in implementing this PR, but I don't know where the added options go. (I imagine in packages/react-scripts/config/webpack.config.*.js?)

If @pelotom could elaborate I will definitely open a PR.

@pelotom
Copy link
Contributor Author

pelotom commented Sep 26, 2017

I've since discovered that tslint-loader has serious performance problems when in type checking mode. Because of this I've stopped using tslint-loader and opted instead for tslint-webpack-plugin.

@DorianGrey
Copy link
Collaborator

Should no longer be a problem due to the inclusion of fork-ts-checker-webpack-plugin, which provides the required ts.Program instance tslint's type-checking.
Note that this is currently only on master, not released.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants