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

Update: Report '\08' and '\09' in no-octal-escape (fixes #12080) #12526

Merged
merged 1 commit into from Nov 13, 2019

Conversation

@mdjermanovic
Copy link
Member

mdjermanovic commented Nov 4, 2019

What is the purpose of this pull request? (put an "X" next to item)

[X] Bug fix #12080

This PR fixes two bugs in no-octal-escape, both fixes can generate more warnings:

  • The rule will now report \0 when followed by 8 or 9, as described in #12080.
  • The rule will now report octal escapes in multiline strings, like in this case:
'\
\1';

At the moment, the rule doesn't check the second and other lines of a multiline string (Online Demo Link)

What changes did you make? (Give an overview)

  • Added 0(?=[89]) to capture 0 as an octal escape sequence.
  • Added the s flag to fix the problem with multiline strings.
  • Also added some tests unrelated to these fixes.

Is there anything you'd like reviewers to focus on?

Copy link
Member

kaicataldo left a comment

LGTM, thanks!

@platinumazure platinumazure merged commit 448ff1e into master Nov 13, 2019
18 checks passed
18 checks passed
Verify Files
Details
Test (ubuntu-latest, 13.x)
Details
Test (ubuntu-latest, 12.x)
Details
Test (ubuntu-latest, 10.x)
Details
Test (ubuntu-latest, 8.x)
Details
Test (ubuntu-latest, 8.10.0)
Details
Test (windows-latest, 12.x)
Details
Test (macOS-latest, 12.x)
Details
Browser Test
Details
commit-message Commit message follows guidelines
Details
continuous-integration Build #20191104.2 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@platinumazure platinumazure deleted the issue12080 branch Nov 13, 2019
@eslint eslint bot locked and limited conversation to collaborators May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.