Support Vue.js single component #477
Comments
@vilchik-elena Hi! Is this feature going to be included anytime soon? In my company we're currently working on a heavy usage of vue single file components with TS scripts, so it would be really useful to have support on SonarQube for this use case :) |
@jf-ravelo-inova good to know it's useful for you! We were not sure how usable it is, so didn't yet consider implementing it. |
I was trying to investigate how we can provide support for Vue SFC. I think we should take inspiration from this code:
|
My company also need to check typescript code in vue single file component, so I want to know when sonarTS will support this feature. Thanks a lot. |
I tried analyzing a Vue.js project and my "npm test" coverage differs from Sonar analysis. All my SFC components are built like this (with externalized TS file) :
Whereas coverage using Jest is properly shown, Sonar shows coverage on *.vue files AND on *.component.ts. *.vue files have template part covered but TS files are shown with a 0% coverage. Will this feature support this ? |
@sahbi-ktifa Could you attach a small reproducer project (with coverage report in it)? |
@vilchik-elena, here you can find a sample project with coverage results : https://github.com/sahbi-ktifa/simple-sample. You can clone this repo and use :
Build and deploy automatically coverage to a local SQ instance (set to localhost:9001 by default) :
It might be a misconfiguration ending into this situation, but I may be wrong. |
I'd also like to vote for a proper .vue SonarTS support :) |
I'd also like to vote for this. |
Hi @vilchik-elena Any chance we can get an estimation for this? |
@shmaram not yet, sorry |
TypeScript analysis was migrated to SonarJS plugin. I am closing this issue, you can follow SonarSource/SonarJS#1281 and https://jira.sonarsource.com/browse/MMF-1441 on this topic. |
https://medium.com/chuckblog/using-typescript-with-vue-js-single-file-components-aaf51cbf5603
The text was updated successfully, but these errors were encountered: