Giter Site home page Giter Site logo

Comments (17)

inverno avatar inverno commented on May 17, 2024 5

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?

from sonarjs.

saberduck avatar saberduck commented on May 17, 2024 4

@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.

from sonarjs.

andirdju avatar andirdju commented on May 17, 2024 3

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.

from sonarjs.

Jiangmx avatar Jiangmx commented on May 17, 2024 1

It is great for us too

from sonarjs.

pwang2 avatar pwang2 commented on May 17, 2024 1

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.

from sonarjs.

Daniel1989 avatar Daniel1989 commented on May 17, 2024

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

from sonarjs.

inverno avatar inverno commented on May 17, 2024

@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 :-)

from sonarjs.

Daniel1989 avatar Daniel1989 commented on May 17, 2024

@inverno Great thanks!

from sonarjs.

inverno avatar inverno commented on May 17, 2024

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

from sonarjs.

 avatar commented on May 17, 2024

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

A lot of projects used *.vue extension. Thanks

from sonarjs.

vilchik-elena avatar vilchik-elena commented on May 17, 2024
  • add some vue files to Ruling IT

from sonarjs.

pwang2 avatar pwang2 commented on May 17, 2024

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

from sonarjs.

inverno avatar inverno commented on May 17, 2024

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

from sonarjs.

pwang2 avatar pwang2 commented on May 17, 2024

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!

from sonarjs.

inverno avatar inverno commented on May 17, 2024

@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?

from sonarjs.

inverno avatar inverno commented on May 17, 2024

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

from sonarjs.

kamontat avatar kamontat commented on May 17, 2024

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

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

from sonarjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.