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

Support Vue.js Single File Components #576

Closed
Daniel1989 opened this issue Apr 24, 2017 · 17 comments
Closed

Support Vue.js Single File Components #576

Daniel1989 opened this issue Apr 24, 2017 · 17 comments
Assignees
Milestone

Comments

@Daniel1989
Copy link

I want to request a feature.

Hi, is there any plan to support .vue file?

@inverno
Copy link
Contributor

inverno commented Apr 24, 2017

Hi @Daniel1989 ,
thanks for bringing this up, currently we are considering to parse the javascript code inside the .vue <script> tag so that we could analyse it like any other js code sitting in a .js file. What do you think?

@Daniel1989
Copy link
Author

Hi @inverno ,
Thanks for your reply, I think your idea is great for me. Could I know when this feature will be available?

@Jiangmx
Copy link

Jiangmx commented Apr 28, 2017

It is great for us too

@inverno
Copy link
Contributor

inverno commented Apr 28, 2017

@Daniel1989
We are considering this feature for next iteration. As soon as it enters an iteration you'll see it here.
Pull requests, of course, are always welcome :-)

@Daniel1989
Copy link
Author

@inverno Great thanks!

@inverno
Copy link
Contributor

inverno commented May 2, 2017

Reopening this. We'll close it when implemented :)

@inverno inverno reopened this May 2, 2017
@ghost
Copy link

ghost commented May 6, 2017

WIll be better for support ES6 syntax(ts as next feature).

A lot of projects used *.vue extension. Thanks

@andirdju
Copy link

while this is in progress, I think we can use this guide as workaround,

https://vuejs.org/v2/guide/single-file-components.html#What-About-Separation-of-Concerns

externalize the js file from the vue file.

@vilchik-elena vilchik-elena modified the milestone: 3.1 Jun 1, 2017
@vilchik-elena vilchik-elena changed the title Support For Vue Support For Vue Single File Components Jun 1, 2017
@vilchik-elena vilchik-elena self-assigned this Jun 2, 2017
@vilchik-elena
Copy link
Contributor

vilchik-elena commented Jun 2, 2017

  • add some vue files to Ruling IT

@vilchik-elena vilchik-elena changed the title Support For Vue Single File Components Support Vue.js Single File Components Jun 2, 2017
@pwang2
Copy link

pwang2 commented Aug 18, 2017

@vilchik-elena , any update for the feature availability?

@inverno
Copy link
Contributor

inverno commented Aug 18, 2017

@pwang2 it's been completed and released in SonarJS 3.1, see the milestone : https://github.com/SonarSource/sonar-javascript/milestone/4?closed=1

@pwang2
Copy link

pwang2 commented Aug 21, 2017

From the link in the repo description, I only see jsx support not vue. I have sonarjs 3.1.1 installed and even after setup suffixes, still is in my vue file is ingored. Did I miss anything here? Thanks!

@inverno
Copy link
Contributor

inverno commented Aug 21, 2017

@pwang2 indeed we did not add .vue to the supported frameworks list, but that's just text. The .vue suffix is pre-configured in 3.1.1 and I just analyzed https://github.com/vuejs-templates/webpack-simple (which contains a .vue file) without any extra configuration.
Mind to provide the log of the analysis, the configuration you are using and maybe a sample .vue file that is failing to be analyzed?

@pwang2
Copy link

pwang2 commented Aug 21, 2017

I just tested with latest version v6.5 sonarqube on my local, it works as expected. it seems the LTS version we used with CI was using an old version of SonarJs. Sorry for the confusion and thank you for help.

@inverno
Copy link
Contributor

inverno commented Aug 22, 2017

@pwang2 no problem, good to know that it works for you

@kamontat
Copy link

kamontat commented Dec 7, 2018

Is it support VueJS? Why is still have skip Vue files ??

Skipping analysis of Vue.js file <path>/default.vue

@saberduck
Copy link
Contributor

@kamontat yes, it is supported. This debug message you are seeing is coming from the new parser, but it's not relevant for the analysis.

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

No branches or pull requests

8 participants