addedInput schema / additionalProperties
Added value: +false
addedInput schema / properties / code / description
Added value: +"The JavaScript source to beautify (also accepted as \"input\")."
addedInput schema / properties / code / examples
Added value: +[
+ "function f(){return 1;}"
+]
addedInput schema / properties / options / additionalProperties
Added value: +false
addedInput schema / properties / options / description
Added value: +"Formatting options. Omit for defaults."
addedInput schema / properties / options / properties / braceStyle / default
Added value: +"collapse"
addedInput schema / properties / options / properties / braceStyle / description
Added value: +"Brace placement: collapse keeps the open brace on the same line; expand moves it to its own line."
addedInput schema / properties / options / properties / braceStyle / enum
Added value: +[
+ "collapse",
+ "expand",
+ "end-expand"
+]
addedInput schema / properties / options / properties / indentSize / default
Added value: +4
addedInput schema / properties / options / properties / indentSize / description
Added value: +"Spaces per indent level (ignored when indentType is \"tab\")."
addedInput schema / properties / options / properties / indentSize / minimum
Added value: +1
addedInput schema / properties / options / properties / indentType / default
Added value: +"space"
addedInput schema / properties / options / properties / indentType / description
Added value: +"Indent with spaces or a tab character."
addedInput schema / properties / options / properties / indentType / enum
Added value: +[
+ "space",
+ "tab"
+]
addedInput schema / properties / options / properties / jslintHappy
Added value: +{
+ "default": false,
+ "description": "Apply JSLint-friendly spacing conventions.",
+ "type": "boolean"
+}
addedInput schema / properties / options / properties / maxLineWidth / default
Added value: +80
addedInput schema / properties / options / properties / maxLineWidth / description
Added value: +"Target maximum line width hint."
addedInput schema / properties / options / properties / maxLineWidth / minimum
Added value: +0
addedInput schema / properties / options / properties / preserveNewlines / default
Added value: +true
addedInput schema / properties / options / properties / preserveNewlines / description
Added value: +"Keep existing blank lines between statements."
addedInput schema / properties / options / properties / spaceInParen
Added value: +{
+ "default": false,
+ "description": "Add spaces inside parentheses.",
+ "type": "boolean"
+}
removedInput schema / properties / options / required
Removed value: -[
- "indentType",
- "indentSize",
- "preserveNewlines",
- "braceStyle",
- "maxLineWidth"
-]
changedInput schema / required
Previous value: -[
- "code",
- "options"
-]New value: +[
+ "code"
+]
changedOutput schema / (root)
Previous value: -nullNew value: +{
+ "properties": {
+ "formattedCode": {
+ "description": "The beautified, re-indented JavaScript.",
+ "type": "string"
+ },
+ "stats": {
+ "description": "Token counts derived from the formatted code.",
+ "properties": {
+ "comments": {
+ "description": "Line and block comments counted.",
+ "type": "integer"
+ },
+ "functions": {
+ "description": "Named function declarations counted.",
+ "type": "integer"
+ },
+ "keywords": {
+ "description": "Reserved-word keyword occurrences counted.",
+ "type": "integer"
+ },
+ "operators": {
+ "description": "Operator occurrences counted.",
+ "type": "integer"
+ },
+ "strings": {
+ "description": "String literals counted.",
+ "type": "integer"
+ },
+ "variables": {
+ "description": "var/let/const declarations counted.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "validationErrors": {
+ "description": "Heuristic syntax warnings (missing semicolons, unmatched quotes/braces); empty when none.",
+ "items": {
+ "properties": {
+ "column": {
+ "description": "1-based column of the issue.",
+ "type": "integer"
+ },
+ "line": {
+ "description": "1-based line number of the issue.",
+ "type": "integer"
+ },
+ "message": {
+ "description": "Human-readable warning text.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+}