Skip to content

Refactor to get rid of outdated enhance-visitors dependency#362

Closed
andreww2012 wants to merge 2 commits into
avajs:mainfrom
andreww2012:refactor/replace-enhance-visitors
Closed

Refactor to get rid of outdated enhance-visitors dependency#362
andreww2012 wants to merge 2 commits into
avajs:mainfrom
andreww2012:refactor/replace-enhance-visitors

Conversation

@andreww2012

@andreww2012 andreww2012 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Hello!

I noticed that enhance-visitors package of this package:

  • Last updated 10 years ago;
  • Brings barely maintained & heavy lodash dependency, which recently received a security vulnerability;
  • Quite trivial;
  • Virtually used by only 2 ESLint plugins.

In this PR, I decided to refactor the code to remove the dependency on it:

  • visitIf wrapper calls was replaced with native control flow expressions;
  • mergeVisitors implementation was inlined.

Along with that, I've slightly improve the architecture of the rules creator to get rid of the currentTestNode flag.

@andreww2012

Copy link
Copy Markdown
Contributor Author

Thank you :)

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

Successfully merging this pull request may close these issues.

1 participant