"use strict"; const React = require("react"); const PropTypes = require("prop-types"); const AnimatedLogo = require("@sandhose/prettier-animated-logo"); const { MarkdownBlock, Container } = require("../../core/CompLibrary.js"); const siteConfig = require(process.cwd() + "/siteConfig.js"); const ButtonGroup = (props) => (
{props.children}
); ButtonGroup.propTypes = { children: PropTypes.node, }; class Button extends React.Component { render() { return (
{this.props.children}
); } } Button.defaultProps = { target: "_self", }; Button.propTypes = { href: PropTypes.string, target: PropTypes.string, children: PropTypes.any, }; function Tidelift() { return ( PRETTIER FOR ENTERPRISE ); } const HomeSplash = (props) => (
 
); HomeSplash.propTypes = { language: PropTypes.string, }; const TldrSection = ({ language }) => (

What is Prettier?

  • An opinionated code formatter
  • Supports many languages
  • Integrates with most editors
  • Has few options

Why?

  • You press save and code is formatted
  • No need to discuss style in code review
  • Saves you time and energy
  • And more
); TldrSection.propTypes = { language: PropTypes.string, }; const Language = ({ name, nameLink, showName, image, variants }) => (
); Language.propTypes = { name: PropTypes.string, nameLink: PropTypes.string, showName: PropTypes.bool, image: PropTypes.string, variants: PropTypes.array, }; const LanguagesSection = () => { const languageChunks = siteConfig.supportedLanguages.reduce( (acc, language) => { const last = acc[acc.length - 1]; if ( last && last.length < 2 && last.reduce((sum, lang) => sum + lang.variants.length, 0) + language.variants.length < 9 ) { last.push(language); } else { acc.push([language]); } return acc; }, [] ); return (

Works with the Tools You Use

{languageChunks.map((languageChunk, index) => (
{languageChunk.map((language) => ( ))}
))}
); }; const Editor = ({ content = "", image, name }) => (

{name}

{content.replace(/\n/g, " \n")}
); Editor.propTypes = { content: PropTypes.string, image: PropTypes.string.isRequired, name: PropTypes.string.isRequired, }; const EditorSupportSection = () => (

Editor Support

{siteConfig.editors.map((editor) => ( ))}
Got more? Send a PR
); const UsersSection = ({ language }) => { const showcase = siteConfig.users .filter((user) => user.pinned) .map((user, i) => ( )); return (

Used By People You Rely On

{showcase}
See Others

Established in the Ecosystem

More than{" "} 2.3 million{" "} dependent repositories on GitHub

More than 6000{" "} dependent packages on npm

); }; UsersSection.propTypes = { language: PropTypes.string, }; class Index extends React.Component { render() { const language = this.props.language || "en"; return (