JS-Beautifier v1.6.0 Release Notes

  • Description

    • Inline/short object and json preservation (all rejoice!)
    • ES6 annotations, module import/export, arrow functions, concise methods, and more
    • JSX spread attributes
    • 🛠 HTML wrap attributes, inline element fixes, doctype and php fixes
    • ✅ Test framework hardening
    • 🏁 Windows build fixed and covered by appveyor continuous integration

    Closed Issues

    • ✅ Individual tests pollute options object (#855)
    • 🌐 Object attribute assigned fat arrow function with implicit return of a ternary causes next line to indent (#854)
    • 🌐 Treat php tags as single in html (#850)
    • 0️⃣ Read piped input by default (#849)
    • 🌐 Replace makefile dependency with bash script (#848)
    • 🌐 list of HTML inline elements incomplete; wraps inappropriately (#840)
    • 🌐 Beautifying bracket-less if/elses (#838)
    • 🌐 elements within a are getting indented incorrectly (#836)
    • 🌐 single attribute breaks jsx beautification (#834)
    • 👌 Improve Python packaging (#831)
    • 🏁 Erroneously changes CRLF to LF on Windows. (#829)
    • 🌐 Can't deal with XHTML5 (#828)
    • 🌐 HTML after PHP is indented (#826)
    • 🌐 exponentiation operator (#825)
    • ➕ Add support for script type "application/ld+json" (#821)
    • 📦 package.json: Remove "preferGlobal" option (#820)
    • 💻 Don't use array.indexOf() to support legacy browsers (#816)
    • 🌐 ES6 Object Shortand Indenting Weirdly Sometimes (#810)
    • 🌐 Implicit Return Function on New Line not Preserved (#806)
    • 🌐 Misformating "0b" Binary Strings (#803)
    • 🌐 Beautifier breaks ES6 nested template strings (#797)
    • 🌐 Misformating "0o" Octal Strings (#792)
    • ✅ Do not use hardcoded directory for tests (#788)
    • 🌐 Handlebars {{else}} tag not given a newline (#784)
    • 🌐 Wrong indentation for XML header (<?xml version="1.0"?>) (#783)
    • 🌐 is_whitespace for loop incrementing wrong variable (#777)
    • 🆕 Newline is inserted after comment with comma_first (#775)
    • 🌐 Cannot copy more than 1000 characters out of CodeMirror buffer (#768)
    • 🌐 Missing 'var' in beautify-html.js; breaks strict mode (#763)
    • 🛠 Fix typo in the example javascript code of index.html (#753)
    • 🌐 Prevent incorrect wrapping of return statements. (#751)
    • 🌐 js-beautify -X breaks code with jsx spread attributes (#734)
    • 🌐 Unhelpful error when .jsbeautifyrc has invalid json (#728)
    • 👌 Support for ES7 decorators (#685)
    • 🌐 Don't wrap XML declaration (or processing instructions) (#683)
    • 🌐 JSX/JS: Single field objects should not expand (#674)
    • 🌐 ES6 Module Loading Object Destructuring newlines (#668)
    • 🌐 Beautifying css tears @media in two lines, adds spaces in names with hyphens (#656)
    • 🌐 ES6 concise method not propely indented (#647)
    • 🌐 Extra newline inserted with wrap_attributes set to "force" (#641)
    • wrap_attributes ignores wrap_attributes_indent_size and wrap_line_length when set to "auto" (#640)
    • 🏁 Error building on Windows (#638)
    • 🌐 Mixed shorthand function with arrow function in object literal is mis-formatted (#602)
    • 🌐 Space does not let save using "&:" (#594)
    • 🌐 Indenting is broken in some cases (#578)
    • 0️⃣ modified cli.js so that it can read from piped input by default (#558)
    • 🚀 Update release process instructions (#543)
    • 🌐 Publish v1.6.0 (#542)
    • 🌐 es6 destructuring (#511)
    • 🌐 NPM js-beautify: different treatment of "-" in command line (#390)
    • 🆕 Newline inserted after ES6 module import/export (#382)
    • 🌐 Option to preserve or inline "short objects" on a single line (#315)
    • 🌐 Format json in line (#114)