{{ summaryTitle }}
{{ summaryValue }}

{{ summaryLine }}

{{ badge.label }} {{ badge.value }}
{{ summaryAnnouncement }}
JavaScript validation inputs
Choose the evidence scope; no profile reads project ESLint configuration or executes the source.
Parse against the selected edition; proposals outside that edition remain out of scope.
Recommended and Strict use this allowlist when reporting undeclared identifiers.
Auto detect prefers a classic script and falls back to an ES module; the resolved type is shown in every artifact.
Paste one standard JavaScript program or load a local .js, .mjs, .cjs, or text file up to 100 KB.
{{ sourceMeta }}
{{ fileStatus || 'Drop one JavaScript or text file onto the editor.' }}
Hidden is neutral. Showing excerpts does not change parsing, findings, severity, or counts.
{{ reportExportStatus }}
{{ report.report_text }}
Scope and rule profiles

Acorn {{ report.parser_version }} parses standard JavaScript for the selected ECMAScript edition and resolved source type. JSX, TypeScript, decorators, package resolution, and project plugins are outside this tool.

Recommended checks syntax plus undeclared identifiers, debugger statements, duplicate object keys, unreachable statements, sparse arrays, and empty blocks. Strict review also flags var declarations, loose equality, console calls, dialog calls, and constant conditions.

Every finding is advisory and requires manual review; no source is rewritten or automatically fixed.

{{ chartExportStatus }}

The chart renderer is unavailable. Counts remain available in the summary and findings ledger.

{{ ledgerExportStatus }}
JavaScript findings ordered by source line, column, and rule id
LocationRuleSeverityFindingFixabilityCopy
L{{ finding.line }}:C{{ finding.column }}{{ finding.rule }}{{ finding.severity }}{{ finding.message }}{{ finding.explanation }}Next: {{ finding.action }}{{ finding.source_excerpt }}{{ finding.fixability }}
No findings in the selected scope.
This is not proof of runtime correctness, project-config compliance, type safety, or dependency validity.

Showing the first {{ findingRows.length }} findings. Fix them, then validate the updated source to continue.

JavaScript can be invalid before it ever reaches a browser or server. A missing bracket, an import in a classic script, or syntax from a newer language edition can stop parsing immediately. Other defects are legal JavaScript but still deserve review, such as an undeclared name, unreachable statement, duplicate object key, or stray debugger statement.

Static validation examines source text without running it. Parsing answers whether the program fits a selected ECMAScript grammar and source type. Lint-style rules then inspect the parsed structure for selected patterns. Neither step observes real network calls, package resolution, runtime types, DOM state, database results, or tests.

  • Classic script and ES module are different grammars. Module syntax permits imports and exports and applies module-specific parsing rules.
  • Language edition sets the syntax ceiling. A construct accepted under ECMAScript 2026 may be rejected under ECMAScript 2015.
  • Environment changes known globals. A browser source can legitimately use document, while a Node.js source may rely on process or Buffer.
  • A clean report is scoped evidence. It means no selected rule fired, not that the program will behave correctly.

Validation works best as an early review before project-specific linting, type checking, tests, and execution in the real target environment. A single-file checker cannot see declarations supplied by another file or the exact configuration used by a larger codebase.

How to Use This Tool:

Match the grammar and environment to the file’s intended destination before judging its findings.

  1. Choose Syntax only for parsing, Recommended core defects for six likely-defect rules, or Strict review for those rules plus five maintainability checks.
  2. Select the ECMAScript version required by the target runtime or build policy.
  3. Choose Browser globals, Node.js globals, or ECMAScript globals only. This changes undeclared-identifier findings but does not load or execute those APIs.
  4. Set Source type. Auto detection tries a classic script first and then an ES module; pin the type when the file contract is known.
  5. Paste one program or load a local JavaScript or text file. If the source is rejected for size or line count, split it into a smaller review unit.
  6. Read the first syntax error before other findings. A parse failure prevents the structural lint rules from examining a complete program.
  7. Correct findings in source order and validate again. Turn on Source excerpts only when matching lines help review; that choice does not change the result.

Interpreting Results:

Syntax valid means the pinned parser built a program structure under the selected edition and resolved source type. It does not mean the source imports successfully, passes a project’s ESLint configuration, satisfies TypeScript, or runs without throwing.

An undeclared-identifier error is local to one file and one global allowlist. Before changing the code, confirm that the name is not intentionally injected by a framework, test harness, host application, or adjacent source file. Warnings identify reviewable patterns; they are not automatic proof of a bug.

If the report reaches 200 findings, it is truncated. Fix the displayed issues and run the updated source again rather than treating the first 200 as the complete total.

Technical Details:

Parsing uses a pinned Acorn 8.17.0 grammar with location tracking, hashbang support, the selected ECMAScript edition, and either script or module semantics. Auto detection accepts a classic script when possible; only a script parse failure triggers a second attempt as a module.

Rule Core

JavaScript validation profiles and rules
Profile Rules Main boundary
Syntax only Selected grammar, edition, and source type. No lint-style findings.
Recommended core defects Undeclared identifiers, debugger, sparse arrays, duplicate object keys, empty blocks, and unreachable statements. Uses bounded lexical scopes and a fixed global allowlist rather than project configuration.
Strict review All recommended rules, plus var, loose equality, console calls, browser dialog calls, and constant conditions. These additional warnings may be deliberate and require manual judgment.

Scope tracking recognizes program, function, block, catch, import, class, and declaration bindings. An identifier reference is reported only when it is absent from those local scopes and from the selected ECMAScript, browser, or Node.js global set. This is intentionally narrower than module-graph or project-wide analysis.

Unreachable-statement checks look for code after break, continue, return, or throw, including terminal blocks and two-sided if branches. Duplicate-key checks allow a paired getter and setter but report later ordinary properties that replace an earlier key.

JavaScript validation bounds
BoundMaximumBehavior
Source characters100,000Larger input is rejected before parsing.
Source lines4,000Larger input is rejected before parsing.
Findings200The report marks itself truncated when more findings exist.

References: