Beautifier for javascript
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 93 finding(s).
Are imports declared and package/API names verified? 42 finding(s).
Are wrappers, guards, and repeated structures necessary? 29 finding(s).
Which changes need focused human review? 151 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/resources/underscore-min.js | 1 | // Underscore.js 1.7.0 | COMMENT |
| LOW | test/data/css/tests.js | 741 | { name: "indent_size", value: "4" }, | COMMENT |
| LOW | test/data/css/tests.js | 761 | // 'var a = {', | COMMENT |
| LOW | test/data/css/tests.js | 781 | // ], | COMMENT |
| LOW | test/data/css/tests.js | 801 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 821 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 841 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 901 | ' two : 2,', | COMMENT |
| LOW | test/data/css/tests.js | 921 | // '};' | COMMENT |
| LOW | test/data/css/tests.js | 961 | ] | COMMENT |
| LOW | test/data/css/tests.js | 981 | // '.div {', | COMMENT |
| LOW | test/data/css/tests.js | 1001 | // ' /* beautify ignore:end */', | COMMENT |
| LOW | test/data/css/tests.js | 1021 | // '}' | COMMENT |
| LOW | test/data/css/tests.js | 1041 | // ' /* beautify ignore:start preserve:start */', | COMMENT |
| LOW | test/data/javascript/tests.js | 61 | // handlebars {{{ ... }}} and {{ ... }} and {{# ... }} and {{! ... }} and {{!-- --}} | COMMENT |
| LOW | test/data/javascript/tests.js | 5181 | // ' {', | COMMENT |
| LOW | test/data/javascript/tests.js | 5201 | // ' id: "a",', | COMMENT |
| LOW | python/cssbeautifier/_main.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/__init__.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/css/options.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/css/beautifier.py | 21 | COMMENT | |
| LOW | python/jsbeautifier/__init__.py | 21 | # Permission is hereby granted, free of charge, to any person | COMMENT |
| LOW | python/jsbeautifier/__init__.py | 41 | # Originally written by Einar Lielmanis et al., | COMMENT |
| LOW | python/jsbeautifier/core/options.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/token.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/tokenstream.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/pattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/templatablepattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/tokenizer.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/directives.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/inputscanner.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/output.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/cli/__init__.py | 21 | # obtaining a copy of this software and associated documentation files | COMMENT |
| LOW | python/jsbeautifier/unpackers/urlencode.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/packer.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/myobfuscate.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/javascriptobfuscator.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/evalbased.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/tests/__init__.py | 1 | # Empty file :) | COMMENT |
| LOW | …sbeautifier/unpackers/tests/test-myobfuscate-output.js | 1 | // | COMMENT |
| LOW | python/jsbeautifier/javascript/options.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/acorn.py | 1 | import re | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 581 | # (c || d)); | COMMENT |
| LOW | js/test/sanitytest.js | 1 | // | COMMENT |
| LOW | js/src/unpackers/javascriptobfuscator_unpacker.js | 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | COMMENT |
| LOW | js/src/unpackers/p_a_c_k_e_r_unpacker.js | 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | COMMENT |
| LOW | js/src/javascript/acorn.js | 1 | /* jshint node: true, curly: false */ | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 1 | # For most projects, this workflow file will not need changing; you simply need | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 41 | - name: Initialize CodeQL | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/jsbeautifier/core/output.py | 261 | self.current_line.push(last_item) | CODE |
| HIGH | python/jsbeautifier/core/output.py | 266 | sweet_code = "\n".join(line.toString() for line in self.__lines) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 292 | self.current_line.push(token.whitespace_before) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 293 | self.current_line.push(token.text) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 300 | self.current_line.push(printable_token) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 309 | self.current_line.push(" ") | CODE |
| HIGH | python/jsbeautifier/javascript/beautifier.py | 354 | line.push(current_token.whitespace_before) | CODE |
| HIGH | python/jsbeautifier/javascript/beautifier.py | 377 | self._output.previous_line.push(popped) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/test-perf-jsbeautifier.py | 3 | CODE | |
| LOW | python/cssbeautifier/_main.py | 27 | CODE | |
| LOW | python/cssbeautifier/_main.py | 28 | CODE | |
| LOW | python/cssbeautifier/_main.py | 29 | CODE | |
| LOW | python/cssbeautifier/_main.py | 30 | CODE | |
| LOW | python/cssbeautifier/_main.py | 33 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 2 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 3 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 4 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 6 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 8 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 9 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 10 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 12 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 25 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 26 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 27 | CODE | |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 25 | CODE | |
| LOW | python/jsbeautifier/core/tokenizer.py | 29 | CODE | |
| LOW | python/jsbeautifier/tests/core/test_options.py | 1 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 5 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 6 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 7 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 11 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 12 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 13 | CODE | |
| LOW | python/jsbeautifier/unpackers/packer.py | 17 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 26 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 27 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/cssbeautifier/_main.py | 100 | CODE | |
| LOW | python/cssbeautifier/css/beautifier.py | 147 | CODE | |
| LOW | python/cssbeautifier/css/beautifier.py | 184 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 154 | CODE | |
| LOW | python/jsbeautifier/core/templatablepattern.py | 149 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 53 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 131 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 189 | CODE | |
| LOW | python/jsbeautifier/unpackers/javascriptobfuscator.py | 24 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 229 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 337 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 373 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 416 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 526 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 569 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 199 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 507 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 708 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 850 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 881 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1206 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1300 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1524 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/test-perf-cssbeautifier.py | 12 | def beautifier_test_github_css(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 14 | def beautifier_test_underscore(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 18 | def beautifier_test_underscore_min(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 22 | def beautifier_test_github_min(): | CODE |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 43 | def __set_whitespace_patterns(self, whitespace_chars, newline_chars): | CODE |
| LOW | python/jsbeautifier/core/tokenizer.py | 86 | def __get_next_token_with_comments(self, previous, open_token): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 53 | def set_file_editorconfig_opts(filename, js_options): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 131 | def get_filepaths_from_params(filepath_params, replace): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 170 | def integrate_editorconfig_options(filepath, local_options, outfile, default_file_type): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 99 | def remove_redundant_indentation(output, frame): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 235 | def handle_whitespace_and_comments( | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 292 | def allow_wrap_or_preserved_newline(self, current_token, force_linewrap=False): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 345 | def print_token_line_indentation(self, current_token): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/jsbeautifier/core/options.py | 103 | except ValueError: | CODE |
| HIGH | python/jsbeautifier/core/options.py | 125 | except ValueError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/cssbeautifier/_main.py | 37 | __all__ = ["default_options", "beautify", "beautify_file", "usage", "main"] | CODE |
| LOW | python/jsbeautifier/__init__.py | 66 | __all__ = [ | CODE |
| LOW | python/jsbeautifier/core/pattern.py | 25 | __all__ = ["Pattern"] | CODE |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 28 | __all__ = ["WhitespacePattern"] | CODE |
| LOW | python/jsbeautifier/core/templatablepattern.py | 28 | __all__ = ["TemplatablePattern"] | CODE |
| LOW | python/jsbeautifier/core/tokenizer.py | 32 | __all__ = ["TOKEN", "Tokenizer", "TokenizerPatterns", "TokenTypes"] | CODE |
| LOW | python/jsbeautifier/core/output.py | 31 | __all__ = ["Output"] | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 40 | __all__ = [ | CODE |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 35 | __all__ = ["TOKEN", "Tokenizer", "TokenTypes"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | js/src/core/output.js | 287 | // but still return True as though you had | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/resources/github.css | 6 | */.flash{position:relative;padding:16px;color:#032f62;background-color:#dbedff;border:1px solid rgba(27,31,35,0.15);bor | COMMENT |
| LOW | python/jsbeautifier/core/output.py | 242 | # otherwise, newline only if we didn't just add one or we're forced | COMMENT |
| LOW | python/jsbeautifier/unpackers/evalbased.py | 32 | # In case of failure, we'll just return the original, without crashing on user. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/cssbeautifier/_main.py | 199 | print("Error while decoding input or encoding output:", file=sys.stderr) | STRING |
| LOW | python/cssbeautifier/_main.py | 203 | except Exception as ex: | STRING |
| MEDIUM | python/jsbeautifier/__init__.py | 296 | print("Error while decoding input or encoding output:", file=sys.stderr) | STRING |
| LOW | python/jsbeautifier/__init__.py | 300 | except Exception as ex: | STRING |
| MEDIUM | python/jsbeautifier/cli/__init__.py | 88 | print("Error loading EditorConfig. Ignoring.", file=sys.stderr) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/data/html/tests.js | 1198 | '[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"', | CODE |
| LOW | test/data/html/tests.js | 1204 | '^^^indent_attr$$$[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"', | CODE |
| LOW | test/data/html/tests.js | 1262 | '<div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>', | CODE |
| LOW | test/data/html/tests.js | 1270 | ' <div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/jsbeautifier/cli/__init__.py | 143 | # Check if each literal filepath exists | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 711 | # Check if this is a BlockStatement that should be treated as a | COMMENT |