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

Unnecessary escape character false possitive #1426

Closed
dbolton opened this issue Sep 28, 2019 · 2 comments
Closed

Unnecessary escape character false possitive #1426

dbolton opened this issue Sep 28, 2019 · 2 comments

Comments

@dbolton
Copy link

dbolton commented Sep 28, 2019

What version of this package are you using?
npx standard
also the linter-js-standard plugin for Atom

What operating system, Node.js, and npm version?
Windows 10
Node 10.16.3
npm 6.9.0

What happened?
The code var test = /[\]\[]/ produces two errors:
Unnecessary escape character: \[.
Unnecessary escape character: \].

What did you expect to happen?
There should be no error messages. This is not a matter of style. Taking out the escape character produces a very different result in JavaScript.

Are you willing to submit a pull request to fix this bug?
No

@mightyiam
Copy link
Member

@dbolton thank you for your report. Under the hood, Standard uses ESLint. And this seems like the following rule:
https://eslint.org/docs/rules/no-useless-escape

Could you please report this upstream? By the way, I don't know regular expressions well, so I did not confirm that this is a bug indeed.

@mightyiam
Copy link
Member

Thank you for following through, @dbolton.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants