Skip to content

Commit

Permalink
Fix: id-match mysteriously fails when defined in a comment. (fixes es…
Browse files Browse the repository at this point in the history
  • Loading branch information
薛定谔的猫 committed Sep 30, 2017
1 parent 8ebb034 commit f703b60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/linter.js
Expand Up @@ -94,6 +94,10 @@ function parseJsonConfig(string, location) {

// Parses a JSON-like comment by the same way as parsing CLI option.
try {

// https://github.com/eslint/eslint/issues/9366
string = string.replace(/\\\\/g, "\\");

items = levn.parse("Object", string) || {};

// Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc*/`.
Expand Down

0 comments on commit f703b60

Please sign in to comment.