AI Slop Code RIsk Monitor

beautifier/js-beautify

Beautifier for javascript

5.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for beautifier/js-beautify, a JavaScript project with 8,997 GitHub stars. SynthScan examined 40,833 lines of code across 146 source files, recording 151 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 5.2 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

5.2
Adjusted Signal
5.2
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
9.0K
Stars
JavaScript
Language
40.8K
Lines of Code
146
Files
151
Pattern Hits
2026-10-12
Scan Date
0.08
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 11.4/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 93 finding(s).

Hallucinated Dependency & Supply Chain Risk 10.5/100 · LOW

Are imports declared and package/API names verified? 42 finding(s).

Agent Over-Engineering Ratio 4.6/100 · LOW

Are wrappers, guards, and repeated structures necessary? 29 finding(s).

PR Review Velocity Impact 23.1/100 · LOW

Which changes need focused human review? 151 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 11MEDIUM 4LOW 136

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 151 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block52 hits · 52 pts
SeverityFileLineSnippetContext
LOWtest/resources/underscore-min.js1// Underscore.js 1.7.0COMMENT
LOWtest/data/css/tests.js741 { name: "indent_size", value: "4" },COMMENT
LOWtest/data/css/tests.js761 // 'var a = {',COMMENT
LOWtest/data/css/tests.js781 // ],COMMENT
LOWtest/data/css/tests.js801 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js821 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js841 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js901 ' two : 2,',COMMENT
LOWtest/data/css/tests.js921 // '};'COMMENT
LOWtest/data/css/tests.js961 ]COMMENT
LOWtest/data/css/tests.js981 // '.div {',COMMENT
LOWtest/data/css/tests.js1001 // ' /* beautify ignore:end */',COMMENT
LOWtest/data/css/tests.js1021 // '}'COMMENT
LOWtest/data/css/tests.js1041 // ' /* beautify ignore:start preserve:start */',COMMENT
LOWtest/data/javascript/tests.js61 // handlebars {{{ ... }}} and {{ ... }} and {{# ... }} and {{! ... }} and {{!-- --}} COMMENT
LOWtest/data/javascript/tests.js5181 // ' {',COMMENT
LOWtest/data/javascript/tests.js5201 // ' id: "a",',COMMENT
LOWpython/cssbeautifier/_main.py1#COMMENT
LOWpython/cssbeautifier/__init__.py1#COMMENT
LOWpython/cssbeautifier/css/options.py1#COMMENT
LOWpython/cssbeautifier/css/beautifier.py21COMMENT
LOWpython/jsbeautifier/__init__.py21# Permission is hereby granted, free of charge, to any personCOMMENT
LOWpython/jsbeautifier/__init__.py41# Originally written by Einar Lielmanis et al.,COMMENT
LOWpython/jsbeautifier/core/options.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/token.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/tokenstream.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/pattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/whitespacepattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/templatablepattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/tokenizer.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/directives.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/inputscanner.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/output.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/cli/__init__.py21# obtaining a copy of this software and associated documentation filesCOMMENT
LOWpython/jsbeautifier/unpackers/urlencode.py1#COMMENT
LOWpython/jsbeautifier/unpackers/packer.py1#COMMENT
LOWpython/jsbeautifier/unpackers/myobfuscate.py1#COMMENT
LOWpython/jsbeautifier/unpackers/javascriptobfuscator.py1#COMMENT
LOWpython/jsbeautifier/unpackers/evalbased.py1#COMMENT
LOWpython/jsbeautifier/unpackers/tests/__init__.py1# Empty file :)COMMENT
LOW…sbeautifier/unpackers/tests/test-myobfuscate-output.js1//COMMENT
LOWpython/jsbeautifier/javascript/options.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/tokenizer.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/acorn.py1import reCOMMENT
LOWpython/jsbeautifier/javascript/beautifier.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/beautifier.py581 # (c || d));COMMENT
LOWjs/test/sanitytest.js1//COMMENT
LOWjs/src/unpackers/javascriptobfuscator_unpacker.js21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERSCOMMENT
LOWjs/src/unpackers/p_a_c_k_e_r_unpacker.js21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERSCOMMENT
LOWjs/src/javascript/acorn.js1/* jshint node: true, curly: false */COMMENT
LOW.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOW.github/workflows/codeql-analysis.yml41 - name: Initialize CodeQLCOMMENT
Cross-Language Confusion8 hits · 50 pts
SeverityFileLineSnippetContext
HIGHpython/jsbeautifier/core/output.py261 self.current_line.push(last_item)CODE
HIGHpython/jsbeautifier/core/output.py266 sweet_code = "\n".join(line.toString() for line in self.__lines)CODE
HIGH⚡python/jsbeautifier/core/output.py292 self.current_line.push(token.whitespace_before)CODE
HIGH⚡python/jsbeautifier/core/output.py293 self.current_line.push(token.text)CODE
HIGH⚡python/jsbeautifier/core/output.py300 self.current_line.push(printable_token)CODE
HIGH⚡python/jsbeautifier/core/output.py309 self.current_line.push(" ")CODE
HIGHpython/jsbeautifier/javascript/beautifier.py354 line.push(current_token.whitespace_before)CODE
HIGHpython/jsbeautifier/javascript/beautifier.py377 self._output.previous_line.push(popped)CODE
Unused Imports29 hits · 29 pts
SeverityFileLineSnippetContext
LOWpython/test-perf-jsbeautifier.py3CODE
LOWpython/cssbeautifier/_main.py27CODE
LOWpython/cssbeautifier/_main.py28CODE
LOWpython/cssbeautifier/_main.py29CODE
LOWpython/cssbeautifier/_main.py30CODE
LOWpython/cssbeautifier/_main.py33CODE
LOWpython/jsbeautifier/__init__.py2CODE
LOWpython/jsbeautifier/__init__.py3CODE
LOWpython/jsbeautifier/__init__.py4CODE
LOWpython/jsbeautifier/__init__.py6CODE
LOWpython/jsbeautifier/__init__.py8CODE
LOWpython/jsbeautifier/__init__.py9CODE
LOWpython/jsbeautifier/__init__.py10CODE
LOWpython/jsbeautifier/__init__.py12CODE
LOWpython/jsbeautifier/core/tokenstream.py25CODE
LOWpython/jsbeautifier/core/tokenstream.py26CODE
LOWpython/jsbeautifier/core/tokenstream.py27CODE
LOWpython/jsbeautifier/core/whitespacepattern.py25CODE
LOWpython/jsbeautifier/core/tokenizer.py29CODE
LOWpython/jsbeautifier/tests/core/test_options.py1CODE
LOWpython/jsbeautifier/cli/__init__.py5CODE
LOWpython/jsbeautifier/cli/__init__.py6CODE
LOWpython/jsbeautifier/cli/__init__.py7CODE
LOWpython/jsbeautifier/cli/__init__.py11CODE
LOWpython/jsbeautifier/cli/__init__.py12CODE
LOWpython/jsbeautifier/cli/__init__.py13CODE
LOWpython/jsbeautifier/unpackers/packer.py17CODE
LOWpython/jsbeautifier/javascript/beautifier.py26CODE
LOWpython/jsbeautifier/javascript/beautifier.py27CODE
Deep Nesting23 hits · 23 pts
SeverityFileLineSnippetContext
LOWpython/cssbeautifier/_main.py100CODE
LOWpython/cssbeautifier/css/beautifier.py147CODE
LOWpython/cssbeautifier/css/beautifier.py184CODE
LOWpython/jsbeautifier/__init__.py154CODE
LOWpython/jsbeautifier/core/templatablepattern.py149CODE
LOWpython/jsbeautifier/cli/__init__.py53CODE
LOWpython/jsbeautifier/cli/__init__.py131CODE
LOWpython/jsbeautifier/cli/__init__.py189CODE
LOWpython/jsbeautifier/unpackers/javascriptobfuscator.py24CODE
LOWpython/jsbeautifier/javascript/tokenizer.py229CODE
LOWpython/jsbeautifier/javascript/tokenizer.py337CODE
LOWpython/jsbeautifier/javascript/tokenizer.py373CODE
LOWpython/jsbeautifier/javascript/tokenizer.py416CODE
LOWpython/jsbeautifier/javascript/tokenizer.py526CODE
LOWpython/jsbeautifier/javascript/tokenizer.py569CODE
LOWpython/jsbeautifier/javascript/beautifier.py199CODE
LOWpython/jsbeautifier/javascript/beautifier.py507CODE
LOWpython/jsbeautifier/javascript/beautifier.py708CODE
LOWpython/jsbeautifier/javascript/beautifier.py850CODE
LOWpython/jsbeautifier/javascript/beautifier.py881CODE
LOWpython/jsbeautifier/javascript/beautifier.py1206CODE
LOWpython/jsbeautifier/javascript/beautifier.py1300CODE
LOWpython/jsbeautifier/javascript/beautifier.py1524CODE
Hyper-Verbose Identifiers13 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/test-perf-cssbeautifier.py12def beautifier_test_github_css():CODE
LOW⚡python/test-perf-jsbeautifier.py14def beautifier_test_underscore():CODE
LOW⚡python/test-perf-jsbeautifier.py18def beautifier_test_underscore_min():CODE
LOW⚡python/test-perf-jsbeautifier.py22def beautifier_test_github_min():CODE
LOWpython/jsbeautifier/core/whitespacepattern.py43 def __set_whitespace_patterns(self, whitespace_chars, newline_chars):CODE
LOWpython/jsbeautifier/core/tokenizer.py86 def __get_next_token_with_comments(self, previous, open_token):CODE
LOWpython/jsbeautifier/cli/__init__.py53def set_file_editorconfig_opts(filename, js_options):CODE
LOWpython/jsbeautifier/cli/__init__.py131def get_filepaths_from_params(filepath_params, replace):CODE
LOWpython/jsbeautifier/cli/__init__.py170def integrate_editorconfig_options(filepath, local_options, outfile, default_file_type):CODE
LOWpython/jsbeautifier/javascript/beautifier.py99def remove_redundant_indentation(output, frame):CODE
LOWpython/jsbeautifier/javascript/beautifier.py235 def handle_whitespace_and_comments(CODE
LOWpython/jsbeautifier/javascript/beautifier.py292 def allow_wrap_or_preserved_newline(self, current_token, force_linewrap=False):CODE
LOWpython/jsbeautifier/javascript/beautifier.py345 def print_token_line_indentation(self, current_token):CODE
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpython/jsbeautifier/core/options.py103except ValueError:CODE
HIGHpython/jsbeautifier/core/options.py125except ValueError:CODE
Modern Structural Boilerplate9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpython/cssbeautifier/_main.py37__all__ = ["default_options", "beautify", "beautify_file", "usage", "main"]CODE
LOWpython/jsbeautifier/__init__.py66__all__ = [CODE
LOWpython/jsbeautifier/core/pattern.py25__all__ = ["Pattern"]CODE
LOWpython/jsbeautifier/core/whitespacepattern.py28__all__ = ["WhitespacePattern"]CODE
LOWpython/jsbeautifier/core/templatablepattern.py28__all__ = ["TemplatablePattern"]CODE
LOWpython/jsbeautifier/core/tokenizer.py32__all__ = ["TOKEN", "Tokenizer", "TokenizerPatterns", "TokenTypes"]CODE
LOWpython/jsbeautifier/core/output.py31__all__ = ["Output"]CODE
LOWpython/jsbeautifier/cli/__init__.py40__all__ = [CODE
LOWpython/jsbeautifier/javascript/tokenizer.py35__all__ = ["TOKEN", "Tokenizer", "TokenTypes"]CODE
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHjs/src/core/output.js287 // but still return True as though you hadCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtest/resources/github.css6 */.flash{position:relative;padding:16px;color:#032f62;background-color:#dbedff;border:1px solid rgba(27,31,35,0.15);borCOMMENT
LOWpython/jsbeautifier/core/output.py242 # otherwise, newline only if we didn't just add one or we're forcedCOMMENT
LOWpython/jsbeautifier/unpackers/evalbased.py32# In case of failure, we'll just return the original, without crashing on user.COMMENT
Excessive Try-Catch Wrapping5 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMpython/cssbeautifier/_main.py199 print("Error while decoding input or encoding output:", file=sys.stderr)STRING
LOWpython/cssbeautifier/_main.py203 except Exception as ex:STRING
MEDIUMpython/jsbeautifier/__init__.py296 print("Error while decoding input or encoding output:", file=sys.stderr)STRING
LOWpython/jsbeautifier/__init__.py300 except Exception as ex:STRING
MEDIUMpython/jsbeautifier/cli/__init__.py88 print("Error loading EditorConfig. Ignoring.", file=sys.stderr)CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/data/html/tests.js1198 '[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"',CODE
LOWtest/data/html/tests.js1204 '^^^indent_attr$$$[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"',CODE
LOWtest/data/html/tests.js1262 '<div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>',CODE
LOWtest/data/html/tests.js1270 ' <div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>',CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/jsbeautifier/cli/__init__.py143 # Check if each literal filepath existsCOMMENT
LOWpython/jsbeautifier/javascript/beautifier.py711 # Check if this is a BlockStatement that should be treated as aCOMMENT