prettier
dprint
Our great sponsors
- Appwrite - The open-source backend cloud platform
- Sonar - Write Clean JavaScript Code. Always.
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Revelo Payroll - Free Global Payroll designed for tech teams
- Onboard AI - Learn any GitHub repo in 59 seconds
prettier | dprint | |
---|---|---|
403 | 19 | |
46,704 | 2,294 | |
0.5% | 5.5% | |
9.7 | 9.0 | |
1 day ago | 23 days ago | |
JavaScript | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prettier
-
TypeScript Boilerplate
Code Formatting with Prettier: The code is automatically formatted with Prettier, ensuring consistency in writing style.
-
How I approach and structure Enterprise frontend applications after 4 years of using Next.js
Prettier
-
Common mistakes that backend programmers make in Angular
However, my primary goal wasn't to fix all these linting errors, as I couldn't guarantee that doing so wouldn't introduce unforeseen issues. Instead, I chose to install husky and set up linting and automatic fixing exclusively for committed files. In cases where automatic fixing wasn't feasible, I encouraged the developers to follow the "boy scout rule" and address the errors they encountered. As I delved into these improvements, I also took the opportunity to seamlessly integrate and configure prettier alongside ESLint. After all, who enjoys scrolling through diffs or pull requests with only formatting changes? It just makes the code review process smoother and more pleasant for everyone involved.
-
How to start building a Next.js project
prettier - For automatic formatting of code files
-
Created a Markdown Desktop App with Tauri
During the document writing process, formatting can often interrupt your creative flow. Although Markdown has done away with formatting operations, sometimes you still need to pay attention to details like spaces between Chinese and English, and blank lines between paragraphs. MDX Editor uses prettier to format documents. Just press command+s to automatically format the document.
-
Do you know how to generate html strings with Emacs Lisp?
;; need prettier' utility installed - https://prettier.io (call-process-shell-command "prettier --write index.html" nil 0) ``
-
Prettier and lint your project with husky and git hooks
Let's install Prettier and ESLint:
-
Way to High Confidence: The Ideal Testing Trophy
Prettier
-
Let's Make Learning Frontend Great Again!
LiveCodes provides many of the commonly used developer tools. These include Monaco editor (that powers VS Code), Prettier, Emmet, Vim/Emacs modes, Babel, TypeScript, SCSS, Less, PostCSS, Jest and Testing Library, among others. All these tools run seamlessly in the browser without any installations or configurations. It feels like a very light-weight version of your own local development environment including the keyboard shortcuts, IntelliSense and code navigation features.
-
Create a typescript utility library using Vite
I'm going with Prettier to format the code. Formatting helps us to keep our code uniform for every developer.
dprint
-
How do I stop Prettier from de-structuring object properties onto separate lines?
Prettier is opinionated. dprint is highly configurable.
-
Rome v12.1: a Rust-based linter formatter for TypeScript, JSX and JSON
I mean, I know I am a bad person because of those long names, but that is how life goes sometimes! And the blank line there at the top is just very important to like, catch one's breath, while reading this code.
(I'm really just posting this in the hopes that somebody will throw me a "Bro, just use hpstrlnt, it totally lets you configure that!" -- I have not actually tried Rome to see if it does (it's Monday morning and I'm not quite ready to be disappointed again...))
[1]: dprint is good, and I recommend it as the best code formatter I currently know of: https://dprint.dev/
- What would you rewrite in Rust?
-
What's the best way to generate code?
If it's something in the vein of one of those things then, worst case, you generate the code first, then run it through something like dprint.
- Ask HN: Alternatives to Prettier?
-
Rome Formatter and Rust Update
If it's speed you are looking for, give dprint (https://github.com/dprint/dprint) a try, it has a vscode plugin too.
Why not dprint[1]? Does it not "produce a concrete syntax tree (CST) that represents the original code completely, whitespace, comments and all"?
I'm not terribly familiar with the architecture of dprint, but it's used in Deno with JS/TS plugin and works great so far.
-
Speed-up your Prettier formatting using prettierd
It is written in Rust, and the formatting is built into the Deno executable using a clone of Prettier https://dprint.dev/. You can use it as your main language server for web based JS/TS as well as Deno specific code.
-
Question about deno fmt
dprint is 99% the same as Prettier, I suggest you try it out and look at the diffs. I did, and reported any differences on https://github.com/dprint/dprint ... any differences all got fixed :)
Internally (https://github.com/denoland/deno/blob/main/cli/tools/fmt.rs) deno seem to use https://github.com/dprint/dprint (hade never heard of this tool before).
What are some alternatives?
black - The uncompromising Python code formatter
JS-Beautifier - Beautifier for javascript
prettier-plugin-organize-imports - Make Prettier organize your imports using the TypeScript language service API.
ESLint - Find and fix problems in your JavaScript code.
Standard - 🌟 JavaScript Style Guide, with linter & automatic code fixer
JSHint - JSHint is a tool that helps to detect errors and potential problems in your JavaScript code
pretty-quick - ⚡ Get Pretty Quick
markdownlint-cli - MarkdownLint Command Line Interface
intellij-rainbow-brackets - 🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio
PostCSS - Transforming styles with JS plugins
husky - Git hooks made easy 🐶 woof!
autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.