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

order-in-character-class: Reported on references #231

Closed
fisker opened this issue Jun 4, 2021 · 2 comments · Fixed by #289
Closed

order-in-character-class: Reported on references #231

fisker opened this issue Jun 4, 2021 · 2 comments · Fixed by #289
Assignees
Labels
enhancement New feature or request

Comments

@fisker
Copy link

fisker commented Jun 4, 2021

const jsxWhitespaceChars = " \n\r\t";
const matchJsxWhitespaceRegex = new RegExp("([" + jsxWhitespaceChars + "]+)");
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The problem is reported here

The location is miss leading, because there is no \n there.

Is it hard? I didn't read code, but I think strings are concated, lost original node info?

Another problem \n/\t/ should be escaped in message, they are invisible.

@RunDevelopment RunDevelopment added the enhancement New feature or request label Jun 4, 2021
@fisker
Copy link
Author

fisker commented Jun 4, 2021

Or maybe we can just display the Regexp literal value in message.

@fisker
Copy link
Author

fisker commented Jun 4, 2021

no-useless-non-capturing-group rule have the same issue.

@RunDevelopment RunDevelopment self-assigned this Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants