You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,30 @@ And that's it! Now when you run `mix format` you'll also get the benefits of Sty
29
29
30
30
### Configuration
31
31
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.
33
33
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/"]`
0 commit comments