Skip to content

Commit

Permalink
docs: add configurable section to README
Browse files Browse the repository at this point in the history
  • Loading branch information
saveman71 committed Jan 26, 2024
1 parent aa1cd1d commit f055ea8
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,30 @@ And that's it! Now when you run `mix format` you'll also get the benefits of Sty

### Configuration

There isn't any! This is intentional.
Contrary to Adobe's original Styler, this fork is a bit more configurable, essentially to allow gradual adoption of the tool.

Styler is @adobe's internal Style Guide Enforcer - allowing exceptions to the styles goes against that ethos. Happily, it's open source and thus yours to do with as you will =)
The config is done in the `.formatter.exs` file:

```
[
plugins: [Styler],
styler: [
# List of rules to enable
# Can have a keyword list of options
{Styler.Style.ModuleDirectives, []},
# Or just a module name
Styler.Style.Pipes
]
]
```

By default, if the `styler` key is not present, all rules are enabled.

#### Supported options

* `ignore_prefixes` - a list of file prefixes to skip when applying the rule. Example: `ignore_prefixes: ["test/"]`

## Features (or as we call them, "Styles")

Expand Down

0 comments on commit f055ea8

Please sign in to comment.