<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":410298,"date":"2017-01-17T18:23:15","date_gmt":"2017-01-17T16:23:15","guid":{"rendered":"http:\/\/nhub.news\/?p=410298"},"modified":"2017-01-17T18:23:15","modified_gmt":"2017-01-17T16:23:15","slug":"new-tool-forces-javascript-code-correctness","status":"publish","type":"post","link":"http:\/\/nhub.news\/fr\/2017\/01\/new-tool-forces-javascript-code-correctness\/","title":{"rendered":"New tool forces JavaScript code correctness"},"content":{"rendered":"<p style=\"text-align: justify;\"><img style=\"float: left; padding: 5px;\" width=\"300px\" src=\"http:\/\/cdn.computerworld.com.au\/dimg\/600x600\/\/idg_sites\/logos\/computerworld_6.png\" alt=\"NewsHub\" border=\"0\" \/>With a tool called Prettier, JavaScript formatting will get a consistent style.<br \/>An opinionated JavaScript formatter inspired by the refmt tool for formatting code, Prettier removes original styling and ensures outputted JavaScript conforms to a consistent style.<br \/>\u00ab\u00a0Prettier gets rid of all original styling and guarantees consistency by parsing JavaScript into an AST (abstract syntax tree) and pretty-printing the AST,\u00a0\u00bb developer James Long said. He noted that the tool makes it easier to write code however a developer wants because it can be instantly formatted correctly afterward.<br \/>Prettier takes JavaScript as input and outputs formatted JavaScript. Still in beta, Prettier tries to support all JavaScript language features, including those that are not standardized. It uses the Babylon parser by default with all language features enabled, but it will also work with the Facebook Flow parser with the useFlowParser API or &#8211;flow-parser CLI option. Prettier has advanced support for language features from ECMAScript 2017 , JSX, and Flow.<br \/>More about AST Facebook<\/p>\n<div id=\"td_post_ranks\" class=\"td-post-comments\" style=\"vertical-align: middle;\">\n<div style=\"float: left;\">\nSimilarity rank: 0\n<\/div>\n<\/div>\n<p><script>\njQuery(function() {\nvar mainContentMetaInfo = '.td-post-header .meta-info';\nvar tdPostRanks = '#td_post_ranks';\nif (jQuery(tdPostRanks).length) {\n    var tdPostRanksHtml = jQuery(tdPostRanks).get(0).outerHTML;\n    if (typeof tdPostRanksHtml != 'undefined') {\n        jQuery(tdPostRanks).remove();\n        jQuery(mainContentMetaInfo).append(tdPostRanksHtml);\n    }\n}\n});\n<\/script><span>&copy; Source: <a href=\"http:\/\/www.computerworld.com.au\/article\/612813\/new-tool-forces-javascript-code-correctness\/?utm_medium=rss&amp;utm_source=sectionfeed\" target=\"_blank\">http:\/\/www.computerworld.com.au\/article\/612813\/new-tool-forces-javascript-code-correctness\/?utm_medium=rss&amp;utm_source=sectionfeed<\/a><br \/>All rights are reserved and belongs to a source media.<\/span><\/p>\n<script>jQuery(function(){jQuery(\"#td_post_ranks\").remove();});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>With a tool called Prettier, JavaScript formatting will get a consistent style.An opinionated JavaScript formatter inspired by the refmt tool for formatting code, Prettier removes original styling and ensures outputted JavaScript conforms to a consistent style.\u00ab\u00a0Prettier gets rid of all original styling and guarantees consistency by parsing JavaScript into an AST (abstract syntax tree) and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":410297,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/410298"}],"collection":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/comments?post=410298"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/410298\/revisions"}],"predecessor-version":[{"id":410299,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/410298\/revisions\/410299"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media\/410297"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media?parent=410298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/categories?post=410298"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/tags?post=410298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}