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

mdjermanovic opened this issue Oct 16, 2020 · 2 comments

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

mdjermanovic opened this issue Oct 16, 2020 · 2 comments


Copy link

@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:


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:



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?


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

Copy link

@nzakas nzakas commented Nov 6, 2020

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


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

@mdjermanovic mdjermanovic commented Nov 6, 2020

I'll work on this.


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.
Public Roadmap
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants