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

no-prefix-literal rule slices off trailing character in autofixer #5464

Closed
adidahiya opened this issue Jul 25, 2022 · 0 comments · Fixed by #5465
Closed

no-prefix-literal rule slices off trailing character in autofixer #5464

adidahiya opened this issue Jul 25, 2022 · 0 comments · Fixed by #5465

Comments

@adidahiya
Copy link
Contributor

Environment

Code Sandbox

Actual behavior

The autofixer for no-prefix-literal has a bug in its text replacement. it cuts off the last character. .bp4-popover2-content becomes .@{bp-ns}-popover2-conten.

Expected behavior

.bp4-popover2-content should become .@{bp-ns}-popover2-content

Possible solution

This bug was introduced in #5172, where the deprecated .substr() method was replaced with .substring()

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 a pull request may close this issue.

1 participant