prettierREADME.md at main | Prettier GitHub
OpinionatedCodeFormatterJavaScript·TypeScript·Flow·JSX·JSONCSS·SCSS·LessHTML·Vue·AngularGraphQL·Markdown·YAMLYourfavoritelanguage?[1]IntroPrettierisanopinionatedcodeformatter.Itenforcesaconsistentstylebyparsingyourcodeandre-printingitwithitsownrulesthattakethemaximumlinelengthintoaccount,wrappingcodewhennecessary.Inputfoo(reallyLongArg(),omgSoManyParameters(),IShouldRefactorThis(),isThereSeriouslyAnotherOne());Outputfoo(reallyLongArg(),omgSoManyParameters(),IShouldRefactorThis(),isThereSerio...
Opinionated Code FormatterJavaScript · TypeScript · Flow · JSX · JSON CSS · SCSS · Less HTML · Vue · Angular GraphQL · Markdown · YAML Your favorite language? [1]
Intro
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
Input foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); Output foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne() );Prettier can be run in your editor[2] on-save, in a pre-commit hook[3], or in CI environments[4] to ensur...