-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: refactor analysis #12651
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
chore: refactor analysis #12651
Conversation
🦋 Changeset detectedLatest commit: d0a3678 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trusting our good test coverage here and not thoroughly reviewing every line - looks good, only found a few outdated comments and possibility to remove some import(...)
statements
// TODO it would be better to just bail out when we hit the ExportSpecifier node but that's | ||
// not currently possibly because of our visitor merging, which I desperately want to nuke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You nuked it :D
// TODO it would be better to just bail out when we hit the ExportSpecifier node but that's | |
// not currently possibly because of our visitor merging, which I desperately want to nuke |
// Ideally this would be in the validation file, but that isn't possible because this visitor | ||
// calls "next" before setting the reactive statements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated
// Ideally this would be in the validation file, but that isn't possible because this visitor | |
// calls "next" before setting the reactive statements. |
e.style_directive_invalid_modifier(node); | ||
} | ||
|
||
// the case for node.value different from true is already covered by the Identifier visitor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated (and now wrong) comment
// the case for node.value different from true is already covered by the Identifier visitor |
Been wanting to do this for a long time — have a single visitor per node type in the analysis phase, so we have more precise control and easier-to-follow code
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint