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

feat: add babel parser and traverse and migrate some rules #448

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

David-Pena
Copy link
Collaborator

Summary

Adds babel parser and traverse packages for AST parsing for some rules.

Description

  • rule functionSize refactored with babel
  • rule parameterCount refactored with babel
  • rule computedSideEffects refactored with babel
  • Extract some reusable blocks to /helpers

Related Issues

Supports #368
Fixes #365 #364 #431

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Screenshots (if applicable)

N/A

@David-Pena David-Pena added the enhancement New feature or request label Nov 4, 2024
@David-Pena David-Pena self-assigned this Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

logo Vue Mess Detector Analysis Results

PR Code Health Full Code Health

🚨 New Errors: 3
⚠️ New Warnings: 4
✅ Fixed Errors: 0
🔧 Fixed Warnings: 0
📝 Total Lines: 227
📁 Total Files: 2

New Issues

- src/rules/rrd/repeatedCss.ts:
  rrd ~ else conditions: else clauses found (1) 🚨
  rrd ~ function size: function (checkRepeatedCss#14) is too long: 32 lines 🚨
  rrd ~ magic numbers: magic numbers found (line #53 magic number: 3) 🚨
- src/rules/rrd/repeatedCss.test.ts:
  rrd ~ Long <script> blocks: (152 lines) 🚨

🔍 Download Full Analysis Details

For any issues or feedback, feel free to report them here.

Copy link

pkg-pr-new bot commented Nov 4, 2024

Open in Stackblitz

yarn add https://pkg.pr.new/rrd108/vue-mess-detector@448.tgz

commit: 43ffdcb

@David-Pena
Copy link
Collaborator Author

not ready to merge, there is a weird bug when running the cli tests
image

@David-Pena
Copy link
Collaborator Author

not ready to merge, there is a weird bug when running the cli tests
image

It seems to be something with the traverse logic because if functionSize, parameterCount and computedSideEffects rules are commented, the error dissapears.

There is a file inside the project which is causing that error when walking through it... I'm still debugging 👀

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

Successfully merging this pull request may close these issues.

Parameter Count seems failed in destructuring object parameters
1 participant