Skip to content

fix: private variable detection to not match multiple dashes #274

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

Closed
wants to merge 1 commit into from

Conversation

Tofandel
Copy link

@Tofandel Tofandel commented Apr 8, 2025

Partial fix for #273

This is not a fix for the conflicting patch that seems to happen though

$app-color-black: #000000;

npx sass-migrator module test.scss --remove-prefix=app

$acolor-black: #000000;

So I will draft until I find the cause of this

@Tofandel Tofandel marked this pull request as draft April 8, 2025 16:16
@Tofandel Tofandel changed the title Fix private variable detection to not match multiple dash fix: private variable detection to not match multiple dashes Apr 8, 2025
@@ -365,6 +365,10 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
}
}

bool _isPrivate(String name) {
return name.startsWith('-') && !name.startsWith('--');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic isn't accurate. Names that start with multiple dashes are still private.

@nex3
Copy link
Contributor

nex3 commented Apr 9, 2025

Superseding this with #275 so I can get a review from a colleague

@nex3 nex3 closed this Apr 9, 2025
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.

2 participants