Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Escape characters are handled incorrectly in inline config comments

See original GitHub issue

Tell us about your environment

  • ESLint Version: v4.7.2
  • Node Version: v8.5.0
  • npm Version: Yarn v1.0.2

What parser (default, Babel-ESLint, etc.) are you using? Default

Please show your full configuration:

    id-match: [2, "^(([^$\\W]|\\$[a-f\\d]{2})+|[$_]\\w*|[^\\W\\d]\\w*|[A-Z]([A-Z_]*[A-Z])?)$", {
        properties: true

What did you do? Please include the actual source code causing the issue.

/* eslint id-match: [2, "^(([^$\\W]|\\$[a-f\\d]{2})+|[$_]\\w*|[^\\W\\d]\\w*|[A-Z]([A-Z_]*[A-Z])?)$", {properties: true}] */

function is$2dvoid(value) {
    return value == null

What did you expect to happen? It to pass (as it does without the comment)

What actually happened? Please include the actual, raw output from ESLint.

  3:10  error  Identifier 'is$2dvoid' does not match the pattern '^(([^$\\W]|\\$[a-f\\d]{2})+|[$_]\\w*|[^\\W\\d]\\w*|[A-Z]([A-Z_]*[A-Z])?)$'  id-match

✖ 1 problem (1 error, 0 warnings)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

platinumazurecommented, Apr 4, 2020

The levn project has just issued version 0.4.1 which allows quoted string literals to use the same escaping rules as JavaScript itself, so upgrading to latest levn may resolve this issue.

kaicataldocommented, Sep 29, 2019

How do we want to proceed with this? It unfortunately doesn’t look like there has been any movement on the levn issue. It seems like moving away from levn might be the prudent thing to do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I escape characters in C# comments? - Stack Overflow
If you need to escape characters in XML comments, you need to use the character entities, so < would need to be escaped...
Read more >
Azure Data Factory (ADF) Escape Character Issue When ...
It seems this is an issue with ADF and whenever an escape character exists in data that is at the end of a...
Read more >
Escaping characters in Java - CodeGym
Hi! In previous lessons, we've already gotten acquainted with text strings, which are represented by the String class in Java.
Read more >
What characters do I need to escape when using sed in a sh ...
4 Answers 4 · Write the regex between single quotes. · Use '\'' to end up with a single quote in the regex....
Read more >
linux - bash: how to pass command line arguments containing ...
Use single quotes. Single quotes ensure that none of the characters are interpreted. $ printf % ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found