Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 10, 2024 via pnpm

prettier 2.8.8

Prettier is an opinionated code formatter
Package summary
Share
0
issues
1
license
1
MIT
Package created
10 Jan 2017
Version published
23 Apr 2023
Maintainers
11
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
prettier@2.8.8
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of prettier 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does prettier do?

Prettier is an opinionated code formatter that helps to enforce a consistent coding style across a project. It achieves this by parsing your code and re-printing it with its own rules, taking into account the maximum line length and wrapping code where necessary. The versatile tool supports various languages, including JavaScript, TypeScript, CSS, SCSS, HTML, Vue, Angular, and many more. By championing streamlined and clean code, Prettier not only enhances code readability but also minimizes the time developers spend on code review.

How do you use prettier?

You can use Prettier in several ways. One common method is to run it in your code editor every time you save changes. This ensures that every piece of code you write adheres to the same style. For instance, if you have a long line of code like the one below:

foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());

Applying Prettier would automatically reformat it in a more readable format:

foo(
  reallyLongArg(),
  omgSoManyParameters(),
  IShouldRefactorThis(),
  isThereSeriouslyAnotherOne(),
);

You can also configure Prettier to run in a pre-commit hook or in CI environments, offering another chance to standardize the code style across your codebase before any changes are committed or deployed.

Where are the prettier docs?

For a comprehensive guide on how to use Prettier, delve into the official Prettier documentation. Here, you'll find everything from how to install the package, customize the options, leverage the Command Line Interface (CLI) and API, and much more. There's also a dedicated Playground page where you can test and play around with Prettier.