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

build: TSLint related warnings in webpack builds (DEV and PROD) #405

Closed
christophercr opened this issue Jun 4, 2018 · 1 comment · Fixed by #1238
Closed

build: TSLint related warnings in webpack builds (DEV and PROD) #405

christophercr opened this issue Jun 4, 2018 · 1 comment · Fixed by #1238

Comments

@christophercr
Copy link
Collaborator

christophercr commented Jun 4, 2018

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

When executing npm start in the Starter or npm run build:prod in starter, these warnings are shown:

 10% building modules 0/1 modules 1 active …stark\showcase\src\polyfills.browser.tsWarning: The 'no-accessor-field-mismatch' rule requires type information.
Warning: The 'no-array-delete' rule requires type information.
Warning: The 'no-collection-size-mischeck' rule requires type information.
Warning: The 'no-dead-store' rule requires type information.
Warning: The 'no-element-overwrite' rule requires type information.
Warning: The 'no-gratuitous-expressions' rule requires type information.
Warning: The 'no-ignored-initial-value' rule requires type information.
Warning: The 'no-ignored-return' rule requires type information.
Warning: The 'no-misleading-array-reverse' rule requires type information.
Warning: The 'no-redundant-boolean' rule requires type information.
Warning: The 'no-return-type-any' rule requires type information.
Warning: The 'no-self-assignment' rule requires type information.
Warning: The 'no-unused-array' rule requires type information.
Warning: The 'no-use-of-empty-return-value' rule requires type information.
Warning: The 'no-useless-cast' rule requires type information.
Warning: The 'no-useless-intersection' rule requires type information.
Warning: The 'no-variable-usage-before-declaration' rule requires type information.
Warning: The 'parameters-max-number' rule requires type information.
Warning: The 'prefer-immediate-return' rule requires type information.
Warning: The 'use-type-alias' rule requires type information.

Expected behavior

No warnings.

Environment

For Tooling issues:

  • Node version: 8.9.4
  • Platform: ALL
@christophercr
Copy link
Collaborator Author

The issue about the lint warnings: Warning: The 'no-array-delete' rule requires type information are because there are some rules in TSLint enabled which previously (before TsLint v5.9.0) required a special flag to be executed.

Now that those rules are enabled, it seems that ts-loader is not executing them correctly because according to the loader the flag to enable the type information is missing. To enable such flag the typeCheck option in the ts-loader should be set to true but unfortunately that has a big performance impact in the build: wbuchwalter/tslint-loader#76 which was already addresed by this PR wbuchwalter/tslint-loader#78 but it has been open for almost a year!

So we need to find a solution for this, which might be to switch to the fork-ts-checker-webpack-plugin as it is mentioned in wbuchwalter/tslint-loader#78... for example: https://github.com/TypeStrong/ts-loader/blob/master/examples/fork-ts-checker/webpack.config.js

@carlo-nomes carlo-nomes self-assigned this Apr 1, 2019
SuperITMan referenced this issue in SuperITMan/stark Apr 3, 2019
…arnings since typeCheck is false

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings since typeCheck is false

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings since typeCheck is false

- update comments in `config/webpack-partial.common.js`

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings while typeCheck is false

- update inline documentation

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings while typeCheck is false

- update inline documentation

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings while typeCheck is false

- update inline documentation

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 4, 2019
…arnings while typeCheck is false

- update inline documentation
- update documentation

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 6, 2019
…arnings while typeCheck is false

- update inline documentation
- update documentation

ISSUES CLOSED: #405
carlo-nomes referenced this issue in SuperITMan/stark Apr 8, 2019
…arnings while typeCheck is false

- update inline documentation
- update documentation

ISSUES CLOSED: #405
SuperITMan referenced this issue in SuperITMan/stark Apr 8, 2019
…arnings since typeCheck is false

ISSUES CLOSED: #405
SuperITMan referenced this issue in SuperITMan/stark Apr 8, 2019
…arnings since typeCheck is false

ISSUES CLOSED: #405
SuperITMan referenced this issue in SuperITMan/stark Apr 8, 2019
…arnings since typeCheck is false

ISSUES CLOSED: #405
@SuperITMan SuperITMan removed their assignment Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants