トップへ戻る
買ってよかったもの
prettier.io
We are excited to announce Prettier 3.7! This release focuses on polishing the TypeScript and Flow experience, specifically by aligning the formatting of classes and interfaces to be more consistent and predictable. We also want your opinion on the upcoming change to fix inconsistent opening brace print logic of class and interface body. Additionally, we also fixed lots of bugs, added support for
This release includes several important feature additions that we're excited to share with you. First, we're shipping a new experimental high-performance CLI behind a feature flag (--experimental-cli). This CLI was previously only available in prettier@next, but now you can enable it simply by using a flag. We encourage you to try it out and share your feedback! If you are interested in the intern
This release includes a lot of bug fixes and the following new features: Support for the new objectWrap option Support for the new experimental experimentalOperatorPosition option Support for TypeScript configuration file See each section for details. If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via our OpenCollective or by sponsoring the pr
Hey, I'm Fabio and I've been contracted by the Prettier team to speed up Prettier's command line interface (CLI). In this post we'll take a look at the optimizations I've discovered, the process that lead to finding them, some exciting numbers comparing the current CLI with the new one, and some guesses about what could be optimized next. Installation The new work-in-progress CLI for Prettier has
Prettier, a JavaScript code formatter, has seen an incredible adoption thanks to its careful handling of the very, very, long tail of ways people can write code. At this point, the formatting logic has been solid and after our work on ternaries lands, it will be in a happy state. This means that we can now focus on the next important aspect: Performance. Prettier has never been fast per se, but fa
This release adds indentation back to nested ternaries along with a new --experimental-ternaries flag to try a more novel "curious ternary" format that scales better to deeply nested conditionals. We are keen for your feedback on the experimental format before it rolls out as the default behavior later this year! We have also added support for the control flow syntax in Angular v17. For details on
We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl
This release includes improvements to the --cache option added in 2.7. A new --cache-location option has been added, and a bug that saved the cache even when --write wasn't specified has been fixed. We're also adding support for TypeScript 4.9 satisfies operator! If you enjoy Prettier and would like to support our work, consider sponsoring us directly via our OpenCollective or by sponsoring the pr
Add --cache and --cache-strategy CLI options (#12800 by @sosukesuzuki) Two new CLI options have been added for a caching system similar to ESLint's one. Please see the doc for more details. If this option is enabled, the following values are used as cache keys and the file is formatted only if one of them is changed. Prettier version Options Node.js version (if --cache-strategy is content) content
This release includes a new singleAttributePerLine option. This is an option to print only one attribute per line in Vue SFC templates, HTML, and JSX. Per our Option Philosophy, we would prefer not to add such an option. However, there are many users who want this feature, and major style guides like Airbnb’s JavaScript Style Guide and Vue’s style guide recommend the single attribute per line styl
Prettier, an opinionated code formatter for JavaScript and many web languages, has been accepting donations at OpenCollective since 2019 and thanks to many generous donations we now have $50,000 in the bank! As a result, we are now able to pay the two active maintainers $1,500/month each. This funding will ensure that they will be able to continue consistent maintenance of Prettier into the future
This release adds support for TypeScript 4.5's new syntax and MDX v2 comment syntax! If you enjoy Prettier and would like to support our work, consider sponsoring us directly via our OpenCollective or by sponsoring the projects we depend on, including typescript-eslint, remark, and Babel. Highlights TypeScript Avoid extra offset in arrow function body when using long types (#11515 by @kachkaev a
This release renames the jsxBracketSameLine option to bracketSameLine, which supports HTML, Vue, and Angular in addition to JSX. The old name has been deprecated. We’ve also added support for TypeScript 4.4, including new syntax features such as class static blocks. If you enjoy Prettier and would like to support our work, consider sponsoring us directly via our OpenCollective or by sponsoring the
This release focuses on fixing long-standing issues in the JavaScript printer. Be warned that, unfortunately, reformatting a project with the new version might result in quite a big diff. If you don’t use ignoreRevsFile to hide such wholesale changes from git blame, it might be about time. A remarkable milestone is the long-awaited release of the Ember / Handlebars formatter. It’s supposed to be t
After 1500 commits and 50 releases since July 2018, we're happy to announce that we've just released v1.0 of Prettier for Ruby. In this blog post, we'd like to give a short overview of how the plugin works, its philosophy, and what to expect in the future. How does it work? Prettier for Ruby works through Prettier's plugin API. Its parse function works by spawning a Ruby process and using Ruby's
You can configure Prettier via (in order of precedence): A "prettier" key in your package.json, or package.yaml file. A .prettierrc file written in JSON or YAML. A .prettierrc.json, .prettierrc.yml, .prettierrc.yaml, or .prettierrc.json5 file. A .prettierrc.js, prettier.config.js, .prettierrc.ts, or prettier.config.ts file that exports an object using export default or module.exports (depends on t
Better defaults, a better CLI and better heuristics. Oh, and TypeScript 3.8. After a long and careful consideration, we decided to change the default values for the trailingComma, arrowParens, and endOfLine options. We made the CLI more intuitive. And we've finally dropped support for Node versions older than 10, which had grown to become a huge maintenance hassle and an obstacle for contributors.
Then, create an empty config file to let editors and other tools know you are using Prettier:
This release improves HTML formatting and contains better CRLF handling, new syntax features, and fixes several bugs. Highlights HTML Respect surrounding linebreaks (#5596 by @ikatyang) Previously, Prettier always put elements in a single line if they didn’t go past the printWidth, but this doesn’t work for elements that are used as if-else blocks or are intended to contain several items. To so
You can use Prettier with a pre-commit tool. This can re-format your files that are marked as “staged” via git add before you commit. Option 1. lint-staged Use Case: Useful for when you want to use other code quality tools along with Prettier (e.g. ESLint, Stylelint, etc.) or if you need support for partially staged files (git add --patch). Make sure Prettier is installed and is in your devDepend
It’s recommended to have a .prettierignore in your project! This way you can run prettier --write . to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files not to format! By default prettier ignores files in version control systems directories (".git", ".jj", ".sl", ".svn" and ".hg") and node_modules
This release adds support for HTML, Vue, Angular and MDX. It also respects decorator position, adds an option for JSX single quotes, allows parser inference via shebang, adds support for several new syntax features, and has a few formatting tweaks. Highlights HTML/Vue/Angular Support HTML, Vue, and Angular (#5259 by @ikatyang, #4753 by @evilebottnawi, #2083 by @azz) Prettier can now format HTML
This release adds YAML support, pragma (i.e. /** @prettier */) support for every language, and improves performance on large files. It also adds support for several new syntax features, and has a few formatting tweaks to make your code even prettier. ✨ Highlights YAML Support YAML (#4563, #4742, #4773, #4854 by @ikatyang) Prettier can now format YAML files! 🎉 The implementation is highly compl
This releases adds support for several new syntax features, formatting fixes and first-class support for working in the browser. Highlights API/CLI Prettier works in the browser! This has been long wanted by the team and our users and we're finally announcing Prettier 1.13 has first-class support for running in the browser. In the past it required several hacks, but as of today you can just loa
次のページ
このページを最初にブックマークしてみませんか?
『Prettier · Opinionated Code Formatter』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く
サクサク読めて、アプリ限定の機能も多数!