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 · Fixed by #13845
Closed

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

mdjermanovic opened this issue Oct 16, 2020 · 2 comments · Fixed by #13845
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

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

@mdjermanovic mdjermanovic added rule Relates to ESLint's core rules feature This change adds a new feature to ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Oct 16, 2020
@mdjermanovic mdjermanovic self-assigned this Oct 16, 2020
@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Nov 6, 2020
@nzakas
Copy link
Member

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
@mdjermanovic
Copy link
Member Author

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
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
Public Roadmap
  
Complete
Development

Successfully merging a pull request may close this issue.

2 participants