Skip to content

Commit

Permalink
Add docs for pre-commit integration (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouge8 committed Jan 2, 2022
1 parent d298d7f commit 00323b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ cargo install stylua --features luau
You can use the [stylua-action](https://github.com/marketplace/actions/stylua) GitHub Action in your CI to install and run StyLua.
This action will use GitHub releases, rather than running cargo install, to speed up your workflow.

### pre-commit
You can use StyLua with [pre-commit](https://pre-commit.com/) by adding the following to your `.pre-commit-config.yaml` file:
```yaml
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v0.11.3
hooks:
- id: stylua
```

### Other Installation Methods
- [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.stylua)
- [Foreman](https://github.com/Roblox/foreman) - Add the following to your `foreman.toml` file:
Expand Down

0 comments on commit 00323b6

Please sign in to comment.