File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 134
134
"'' ${tools.prettier}/bin/prettier"
135
135
'' ;
136
136
} ;
137
+
138
+ write =
139
+ mkOption {
140
+ type = types . bool ;
141
+ description = lib . mdDoc "Whether to edit files inplace." ;
142
+ default = true ;
143
+ } ;
144
+
145
+ output =
146
+ mkOption {
147
+ description = lib . mdDoc "Output format." ;
148
+ types = types . nullOr types . enum [ "check" "list-diffrent" ] ;
149
+ default = "list-different" ;
150
+ } ;
137
151
} ;
138
152
eslint =
139
153
{
542
556
{
543
557
name = "prettier" ;
544
558
description = "Opinionated multi-language code formatter." ;
545
- entry = "${ settings . prettier . binPath } --write --list-different --ignore-unknown" ;
559
+ entry = with settings . prettier ;
560
+ "${ binPath } ${ lib . optionalString write "--write" } ${ lib . optionalString ( output != null ) "--${ output } " } --ignore-unknown" ;
546
561
types = [ "text" ] ;
547
562
} ;
548
563
hunspell =
You can’t perform that action at this time.
0 commit comments