Codelyzer: Do we need "Invoke Injectable" rule?

Created on 6 Mar 2017  路  4Comments  路  Source: mgechev/codelyzer

Do we really need this as a rule? TypeScript simply fails if it's not invoked:

Error:(16, 1) TS1238:Unable to resolve signature of class decorator when called as an expression.
  Supplied parameters do not match any signature of call target.

I see it being suggested in https://github.com/mgechev/codelyzer/issues/70, but is really all that "mysteriously"? My IDE (WS) also clearly underlines it.

Most helpful comment

Good point. There should be a clean-up. Few rules which are no longer required are:

  • templates-use-public
  • no-access-missing-member
  • invoke-injectable

The final one is handled by the tsc, first two by ngc.

All 4 comments

Good point. There should be a clean-up. Few rules which are no longer required are:

  • templates-use-public
  • no-access-missing-member
  • invoke-injectable

The final one is handled by the tsc, first two by ngc.

wow, I took some time to figure out why ng lint --type-check was giving me errors about missing rules after the update. I couldn't find documentation about these rules until I found this issue and found out they were removed by a codelyzer new version

Nevermind, I figured out I should've gone to read the changelog instead of googleing the rule

https://github.com/mgechev/codelyzer/blob/master/CHANGELOG.md

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damsorian picture damsorian  路  3Comments

snebjorn picture snebjorn  路  5Comments

QuentinFchx picture QuentinFchx  路  3Comments

michaeljota picture michaeljota  路  4Comments

mattlewis92 picture mattlewis92  路  5Comments