JavaScript Checker (ESLint): Find Bugs, Undefined Variables and Dead Code

What is it?

The JavaScript Checker runs your code through ESLint, the linter used by most professional teams, without installing Node.js. It finds syntax errors, variables used before they exist, unused variables, = instead of === inside an if, unreachable code, duplicate keys and other mistakes that cause bugs. Each problem shows its line and the ESLint rule name in brackets.

Who is it for?

Students learning JavaScript, bloggers adding a script to a theme, and developers who want a quick second opinion on a snippet before pasting it into a project.

How to use it

  1. Paste your code into the JavaScript to check box, or tap Try a sample to see how it works.
  2. The list of problems updates as you type: ✕ marks an error, ! a warning. The line above it sums up, for example “2 errors, 1 warning. Tap Show to jump to the line.”
  3. Choose where the code runs: Browser (knows window and document), ES module (allows import and export) or Node.js (allows require and module). Tick Also check style (===, const, curly braces, console) for stricter advice.
  4. Tap Show next to a problem to jump to that line, fix it, and watch the list update. Problems that are not on one line say Whole file. Clear empties the box.

Worked example

Type if (x = 1) {}. The checker flags the assignment inside the condition. Change it to if (x === 1) {}; if x was never declared, you now see no-undef instead, which tells you to add let x = 0; first.

Tips

  • Search the rule name shown, such as “no-undef eslint”, to read why it matters.
  • Real bugs are errors; risky habits like eval are warnings.

Is my code uploaded?

No. The checker is downloaded once from a public download server (jsDelivr or cdnjs) and then runs inside your browser. Your code never leaves your device, so it is safe for work and client projects.

Errors and how to fix them

  • “✓ ESLint found no problems”: no bugs were detected with the chosen rules.
  • Parsing error: the code cannot run at all, usually because of a missing bracket, quote or comma. Fix it before anything else.
  • no-undef: a name is used that was never declared. Check the spelling, or switch to Node.js or ES module if it is require or import.
  • no-cond-assign: if (x = 1) sets x instead of comparing it. Use === .
  • no-unused-vars (warning): a variable is never used; delete it or use it.
  • Nothing happens, or a “Could not load” message: the first use downloads the library. Check your internet connection, turn off an ad or script blocker for this site, and reload the page.

Open the tool: JavaScript Checker (ESLint)

Still stuck?

Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.

Questions, or an error not listed here?

Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.