diff --git a/lib/compiler/js.js b/lib/compiler/js.js
index <HASH>..<HASH> 100644
--- a/lib/compiler/js.js
+++ b/lib/compiler/js.js
@@ -34,7 +34,7 @@ let js = {
     return s
       .replace(/\\/g,   "\\\\")   // backslash
       .replace(/\//g,   "\\/")    // closing slash
-      .replace(/\]/g,   "\\]")    // closing bracket
+      .replace(/]/g,    "\\]")    // closing bracket
       .replace(/\^/g,   "\\^")    // caret
       .replace(/-/g,    "\\-")    // dash
       .replace(/\0/g,   "\\0")    // null
Remove unnecessary escaping of "]" in a regexp

This fixes the following ESLint error, which started to appear after
eslint/eslint#<I> was fixed:

  /Users/dmajda/Programming/PEG.js/pegjs/lib/compiler/js.js
    <I>:<I>  error  Unnecessary escape character: \]  no-useless-escape

This should fix broken Travis CI builds:

  <URL>