Programming: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 24: Line 24:
= Keeping Your Code Clean With Prettier =
= Keeping Your Code Clean With Prettier =
[https://www.makeuseof.com/keeping-code-clean-with-prettier/ Keeping Your Code Clean With Prettier], [https://prettier.io/playground/ the playground].
[https://www.makeuseof.com/keeping-code-clean-with-prettier/ Keeping Your Code Clean With Prettier], [https://prettier.io/playground/ the playground].
<pre>
$ cat > tmp.js <<EOF
(function ()
{
    window.alert('ok')
}())
EOF
$ npx prettier --write tmp.js
$ cat tmp.js
(function () {
  window.alert("ok");
})();
</pre>

Revision as of 11:45, 19 December 2020