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

New rule proposal: no-nonoctal-decimal-escape #13765

Closed
mdjermanovic opened this issue Oct 16, 2020 · 2 comments
Closed

New rule proposal: no-nonoctal-decimal-escape #13765

mdjermanovic opened this issue Oct 16, 2020 · 2 comments

Comments

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Oct 16, 2020

Please describe what the rule should do:

Disallow \8 and \9 escape sequences in string literals.

What new ECMAScript feature does this rule relate to?

NonOctalDecimalEscapeSequence has been recently added to the specification:

tc39/ecma262#2054

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem)
[X] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

"\8"

"\9"

Why should this rule be included in ESLint (instead of a plugin)?

It disallows the use of an Annex B feature:

These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code.

Are you willing to submit a pull request to implement this rule?

Yes.

Previous discussion about including this in some of the existing rules: #13740

@nzakas
Copy link
Member

@nzakas nzakas commented Nov 6, 2020

Marking as accepted as there is a champion and three 👍s

Loading

@nzakas nzakas added this to Planned in Public Roadmap via automation Nov 6, 2020
@mdjermanovic
Copy link
Member Author

@mdjermanovic mdjermanovic commented Nov 6, 2020

I'll work on this.

Loading

Public Roadmap automation moved this from Planned to Complete Nov 20, 2020
mdjermanovic added a commit that referenced this issue Nov 20, 2020
* New: Add no-nonoctal-decimal-escape rule (fixes #13765)

* Remove extra blank line

* Add spec link
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Public Roadmap
  
Complete
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants