Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: How to ensure code quality of Vue.js app (deepscan.io)
5 points by wschoi on Oct 24, 2018 | hide | past | favorite | 1 comment


Hi. DeepScan is a static analyzer that understands the execution and data flow of JavaScript programs.

It has dedicated rules for Vue.js app. For example, an uninitialized property of Vue instance is detected as follows:

  Vue.component('Hello', {
    template: '<div>Hello</div>',
    methods: {
      log() {
        // VUE_UNINITIALIZED_INSTANCE_PROPERTY alarm:
        //   The '$el' property of a Vue instance is not yet initialized.
        //   Consider not using the property during the execution of 'created()'.
        console.log(this.$el); 
      }
    },
    created() { this.log(); }
  });
Also, DeepScan aggressively filters out low impact issues and tries to report actual code problems. I hope that DeepScan is helpful in ensuring the code quality of Vue.js app.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: