Skip to content

feat: similified no-sldshook-fallback-for-lwctoken Eslint v9 #246

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

Merged
merged 6 commits into from
Aug 18, 2025

Conversation

riteshiitbbs007
Copy link
Contributor

@riteshiitbbs007 riteshiitbbs007 commented Aug 17, 2025

Screenshot 2025-08-18 at 12 13 17 AM Locally tested!

@riteshiitbbs007 riteshiitbbs007 marked this pull request as ready for review August 17, 2025 18:43
@riteshiitbbs007 riteshiitbbs007 added ready-for-review PR is ready to be reviewed by any reviewer and removed NOT READY labels Aug 17, 2025
Comment on lines 52 to 63
// Parse fallback: extract text after first comma, handle nested var()
const commaMatch = rawValue.match(/,\s*(.+)\)$/);
if (!commaMatch) return;

const fallbackPart = commaMatch[1].trim();

// Extract SLDS token from nested var() function in fallback
const sldsMatch = fallbackPart.match(/var\(([^,)]+)/);
if (!sldsMatch) return;

const sldsToken = sldsMatch[1];

Copy link
Contributor

Choose a reason for hiding this comment

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

Use parser instead of relying on regx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-08-18 at 1 11 55 PM Updated

@sf-nithappu sf-nithappu added requested-changes Change in implementation is requested from reviewer and removed ready-for-review PR is ready to be reviewed by any reviewer labels Aug 18, 2025
@riteshiitbbs007 riteshiitbbs007 added ready-for-review PR is ready to be reviewed by any reviewer and removed requested-changes Change in implementation is requested from reviewer labels Aug 18, 2025
@riteshiitbbs007 riteshiitbbs007 merged commit 7474a75 into develop Aug 18, 2025
1 check failed
@riteshiitbbs007 riteshiitbbs007 deleted the no-sldshook-fallback-for-lwctoken branch August 18, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review PR is ready to be reviewed by any reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants