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

Add regexp/no-control-character rule #333

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Conversation

RunDevelopment
Copy link
Collaborator

Relates to #325.

Changes to ESLint's rule:

  • There are suggestions for the characters \0\r\n\t\v\f.
  • This rule allows \0\r\n\t\v\f in RegExp constructor strings. E.g. RegExp("\n") is allowed.
  • The rule detects escaped control characters. E.g. RegExp("\\\x0a") is reported.

Copy link
Owner

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM!

RegExp("\n") is allowed.

That's nice! Thank you!

@ota-meshi ota-meshi merged commit e163036 into master Sep 23, 2021
@ota-meshi ota-meshi deleted the no-control-character branch September 23, 2021 00:34
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