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

ESLint terminated with error. [object Object] #77

Open
BobNVL opened this issue Oct 19, 2018 · 0 comments
Open

ESLint terminated with error. [object Object] #77

BobNVL opened this issue Oct 19, 2018 · 0 comments

Comments

@BobNVL
Copy link

BobNVL commented Oct 19, 2018

I just downloaded Brackets and I am trying it out. I loaded a .js file, cleaned it up. I'm getting one JSLint warning (not problem) an an ESLint error:

ESLint terminated with error. [object Object]

The JavaScript code is:```

/*jslint browser: false */
/*eslint browser: true */
/*
CLCP v2.1 Clear Links to Current Page
Jonathan Snook
This code is offered unto the public domain
http://www.snook.ca/jonathan/
*/

/* Modified, June 24, 2011 to add capability to change all or only the first link found,
by Bob Novell http://www.bobnovell.com
*/

function clearCurrentLink(changeAll) {
     "use strict";
     var a, i;
     a = document.getElementsByTagName("A");
     for (i = 0; i < a.length; i = i + 1) {
          if (a[i].href === window.location.href.split("#")[0]) {     // code ignores references to named anchors on the same page
               a[i].innerHTML = "<span class='currentlpage'>" + a[i].innerHTML + "</span>";
               removeNode(a[i]);
               if (changeAll === undefined) {  // if nothing is passed for changeAll, we only do one reset - in the navagation list - this is in case pages contain
                    return;                    // If you are unsure what to code for changeAll, specify true if you want all links changed and don't code anything
               }                              // if you want only the first link found changed - like if you only want to change the link in a navigation table.
          }
     }
}

function removeNode(n) {
     "use strict";
     var i;
     if (n.hasChildNodes()) {
          for (i = 0; i < n.childNodes.length; i = i + 1) {
               n.parentNode.insertBefore(n.childNodes[i].cloneNode(true), n);
          }
     }
     n.parentNode.removeChild(n);
}

Whar does this message mean and how to I clear the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant