/probot-prettifier

A Probot GitHub app to automatically prettify code in pull requests

Primary LanguageJavaScriptMIT LicenseMIT

Prettifier

A GitHub App built with Probot that automatically prettifies code in pull requests using Prettier.

Usage

Install the app by visiting the app page. You can choose which repositories it will run on from the app settings page.

Example commit history

Config

Create a file .github/prettifier.yml with your config:

commitMessage: "Prettify Code"

printWidth: 100
tabWidth: 2
useTabs: false
semi: true
singleQuote: true
jsxBracketSameLine: true
jsxSingleQuote: false
trailingComma: "es5"
bracketSpacing: true
arrowParens: "avoid"

commitMessage defaults to Prettify Code but you can change this to whatever you want.

The rest of the settings come from Prettier's options which is what this app uses. Please refer to their documentation to find a full list and explanation of the options.

Setup

# Install dependencies
npm install

# Run the bot
npm start

Contributing

If you have suggestions for how Prettifier could be improved, or want to report a bug, open an issue! I'd love all and any contributions.

For more, check out the Contributing Guide.

License

MIT © 2019 Shubham Jain shubham.jain@hotmail.com