Page MenuHomePhabricator

TypeScript type checking not working for the Vue component library
Closed, ResolvedPublic


As a developer, I expect a CI job to fail if I use an incorrect type declaration inside component TS code.

Reproduction steps:

  • change any type declaration to something incorrect, e.g. change the return type of the button prop validator to object
  • run any command that you would expect to error in this situation, e.g. docker-compose run --rm node lerna run test --scope @wmde/wikit-vue-components
  • ~> no errors

This should throw an error at some point in the build process.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jakob_WMDE renamed this task from TypeScript type checking not part of CI to TypeScript type checking not working for the Vue component library.Oct 8 2020, 1:47 PM
Jakob_WMDE updated the task description. (Show Details)

It appears that even out of the box (with a "fresh" vue-cli config vor vue 2.x) type checking is not performed on test or lint, only on build.

This issue seems to have started with the introduction of Storybook 6.0.0 (not sure exactly why, but I suspect it has to do with some webpack voodoo) and as a confirmation, when reverting back to Sotrybook 5.0.0 typechecking does resume expected functionality. However, when installing Storybook 6.0.0 on a fresh install, this does not occur. Upon further investigation it seems that a combination of the Storybook version and a a difference between @vue/cli-plugin-typescript 3.0.0 and @vue/cli-plugin-typescript 4.0.0 seems to be the issue itself (which further indicates webpack voodoo).

Correction: It appears to exclusively happen between Storybook 6+ and @vue/cli-plugin-typescript ~4.4 (resolved in 4.5)