-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Apply rule against root-level strings #9
Apply rule against root-level strings #9
Conversation
🦋 Changeset detectedLatest commit: 7ee3f3a The changes in this PR will be included in the next version bump. 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 |
lib/rules/no-raw-text.ts
Outdated
@@ -111,7 +111,7 @@ function checkSvelteLiteralOrText( | |||
const loc = literal.loc! | |||
context.report({ | |||
loc, | |||
message: `raw text '${literal.value}' is used` | |||
message: `raw text '${literal.value.trimStart().trimEnd()}' is used` |
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.
I thought this would help with cleaning up the whitespace so the error message was relevant.
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.
Thank you fro this PR!
Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
Co-authored-by: Yosuke Ota <otameshiyo23@gmail.com>
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.
LGTM! Thank you!
Thanks for being so quick with the review. When you get a chance can you publish a new version of the package to npm? Thanks again! |
Hello! Thanks for this handy lint rule. I noticed it wasn't working for raw strings at the root level. I made a chance and added a test. Hope this works, let me know if you'd like any changes.