npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@brenoepic/vue-mess-detector

v0.43.0

Published

A static code analysis tool for detecting code smells and best practice violations in Vue.js and Nuxt.js projects

Downloads

67

Readme

Vue Mess Detector

A static code analysis tool for detecting code smells and best practice violations in Vue.js and Nuxt.js projects.

👥 Core Team

⬇️ Installation

As a vscode extension

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install WebMania.vue-mess-detector

More info: https://marketplace.visualstudio.com/items?itemName=WebMania.vue-mess-detector

From npm registry

# using pnpm
pnpm add vue-mess-detector -D

# using yarn
yarn add vue-mess-detector -D

# using npm
npm install vue-mess-detector --save-dev

# using bun
bun add @rrd/vue-mess-detector --dev

From JSR registry

# using deno
deno add @rrd/vue-mess-detector

# using pnpm
pnpm dlx jsr add @rrd/vue-mess-detector -D

# using yarn
yarn dlx jsr add @rrd/vue-mess-detector -D

# using npm
npx jsr add @rrd/vue-mess-detector --save-dev

# using bun
bunx jsr add @rrd/vue-mess-detector --dev

⚙️ Usage

Basic usage:

npx vue-mess-detector analyze [path]

Options:

| Option | Description | Default | Example | | ----------- | ------------------------------------------------------- | ------- | ------------------------------------------------------ | | [path] | Specify directory or file to analyze | ./src | ./src/components/AppHeader.vue | | --exclude | Exclude directories or files (comma-separated) | None | --exclude=components,Gauranga.vue | | --apply | Apply only specific rulesets or rules (comma-separated) | All rules | --apply=vue-essential,magicNumbers | | --ignore | Ignore only specific rulesets or rules (comma-separated) | - | --ignore=vue-caution,functionSize | | --group | Group results by file or rule | rule | --group=file | | --order | Order results (asc or desc) | asc | --order=desc | | --level | Show only specific level (error or warning) | Both | --level=error | | --output | Output format text or table or json | text | --output=table |

If you want to store your flags in a configuration file, you can create a vue-mess-detector.json file in the root of your project with the following content:

{
  "apply": "vue-strong,rrd",
  "level": "error"
}

Then you can run the command without flags:

npx vue-mess-detector analyze

All flags will be read from the configuration file. All missing flags will be set to their default values except if you provide them as flags in the command line.

📊 Example output

Without --group flag (default behavior is to group per rule) ⬇️

Output Image - Group By Rule

With --group=file flag ⬇️

Output Image - Group By File

🧾 Output explanation

Group by Rule: In this view, the first line is highlighted in blue, representing the rule being evaluated. Following this, you'll see blocks of information structured as follows: file path, description, and message.

Group by File: In this view, the first line displays the file path being evaluated. Below this, you'll see blocks of information with the following structure: rule, description, and message.

  • Rule: The blue line that defines the specific rule being evaluated.
  • File: Shows the path to the file where the rule is applied.
  • Description: A concise explanation of the rule, often accompanied by a link to relevant documentation for further details.
  • Message: Indicates the line of code where the rule was violated.

[!IMPORTANT] Yellow messages are warnings, suggesting best practices, while red messages highlight errors that must be corrected.

📈 Code Health

Output Image - Code Health

According to the number of errors and warnings, and the lines of code in your project, we calculate a health score for your project.

The code health is:

  • low if the score is under 75%
  • medium if the score is between 75% and 85%
  • ok if the score is between 86% and 95%
  • good if the score is above 95%

📚 Documentation

👉 For more information, see the documentation.

🤝 How to contribute?

See CONTRIBUTING.md file.