Skip to content

Commit f055ea8

Browse files
committed
docs: add configurable section to README
1 parent aa1cd1d commit f055ea8

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,30 @@ And that's it! Now when you run `mix format` you'll also get the benefits of Sty
2929

3030
### Configuration
3131

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

34-
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 =)
34+
The config is done in the `.formatter.exs` file:
35+
36+
```
37+
[
38+
plugins: [Styler],
39+
styler: [
40+
# List of rules to enable
41+
42+
# Can have a keyword list of options
43+
{Styler.Style.ModuleDirectives, []},
44+
45+
# Or just a module name
46+
Styler.Style.Pipes
47+
]
48+
]
49+
```
50+
51+
By default, if the `styler` key is not present, all rules are enabled.
52+
53+
#### Supported options
54+
55+
* `ignore_prefixes` - a list of file prefixes to skip when applying the rule. Example: `ignore_prefixes: ["test/"]`
3556

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

0 commit comments

Comments
 (0)