|
172 | 172 | options.settings = {
|
173 | 173 | binPath =
|
174 | 174 | mkOption {
|
175 |
| - type = types.nullOr types.path; |
176 |
| - description = "`biome` binary path. E.g. if you want to use the `biome` in `node_modules`, use `./node_modules/.bin/biome`."; |
| 175 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
| 176 | + description = '' |
| 177 | + `biome` binary path. |
| 178 | + For example, if you want to use the `biome` binary from `node_modules`, use `"./node_modules/.bin/biome"`. |
| 179 | + Use a string instead of a path to avoid having to Git track the file in projects that use Nix flakes. |
| 180 | + ''; |
177 | 181 | default = null;
|
| 182 | + defaultText = lib.literalExpression '' |
| 183 | + "''${tools.biome}/bin/biome" |
| 184 | + ''; |
| 185 | + example = lib.literalExpression '' |
| 186 | + "./node_modules/.bin/biome" |
| 187 | + ''; |
178 | 188 | };
|
179 | 189 |
|
180 | 190 | write =
|
|
464 | 474 | options.settings = {
|
465 | 475 | binPath =
|
466 | 476 | mkOption {
|
467 |
| - type = types.nullOr types.path; |
468 |
| - description = |
469 |
| - "`eslint` binary path. E.g. if you want to use the `eslint` in `node_modules`, use `./node_modules/.bin/eslint`."; |
| 477 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
| 478 | + description = '' |
| 479 | + `eslint` binary path. |
| 480 | + For example, if you want to use the `eslint` binary from `node_modules`, use `"./node_modules/.bin/eslint"`. |
| 481 | + Use a string instead of a path to avoid having to Git track the file in projects that use Nix flakes. |
| 482 | + ''; |
470 | 483 | default = null;
|
471 |
| - defaultText = lib.literalExpression "\${tools.eslint}/bin/eslint"; |
| 484 | + defaultText = lib.literalExpression '' |
| 485 | + "''${tools.eslint}/bin/eslint" |
| 486 | + ''; |
| 487 | + example = lib.literalExpression '' |
| 488 | + "./node_modules/.bin/eslint" |
| 489 | + ''; |
472 | 490 | };
|
473 | 491 |
|
474 | 492 | extensions =
|
|
489 | 507 | binPath =
|
490 | 508 | mkOption {
|
491 | 509 | type = types.nullOr types.str;
|
492 |
| - description = "flake8 binary path. Should be used to specify flake8 binary from your Nix-managed Python environment."; |
| 510 | + description = "flake8 binary path. Should be used to specify flake8 binary from your Python environment."; |
493 | 511 | default = null;
|
494 | 512 | defaultText = lib.literalExpression ''
|
495 | 513 | "''${tools.flake8}/bin/flake8"
|
|
619 | 637 | options.settings = {
|
620 | 638 | hintFile =
|
621 | 639 | mkOption {
|
622 |
| - type = types.nullOr types.path; |
| 640 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
623 | 641 | description = "Path to hlint.yaml. By default, hlint searches for .hlint.yaml in the project root.";
|
624 | 642 | default = null;
|
625 | 643 | };
|
|
822 | 840 | options.settings = {
|
823 | 841 | binPath =
|
824 | 842 | mkOption {
|
825 |
| - type = types.nullOr types.path; |
826 |
| - description = "mkdocs-linkcheck binary path. Should be used to specify the mkdocs-linkcheck binary from your Nix-managed Python environment."; |
| 843 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
| 844 | + description = "mkdocs-linkcheck binary path. Should be used to specify the mkdocs-linkcheck binary from your Python environment."; |
827 | 845 | default = null;
|
828 | 846 | defaultText = lib.literalExpression ''
|
829 | 847 | "''${tools.mkdocs-linkcheck}/bin/mkdocs-linkcheck"
|
@@ -1046,13 +1064,19 @@ in
|
1046 | 1064 | options.settings = {
|
1047 | 1065 | binPath =
|
1048 | 1066 | mkOption {
|
1049 |
| - description = |
1050 |
| - "`prettier` binary path. E.g. if you want to use the `prettier` in `node_modules`, use `./node_modules/.bin/prettier`."; |
1051 |
| - type = types.nullOr types.path; |
| 1067 | + description = '' |
| 1068 | + `prettier` binary path. |
| 1069 | + For example, if you want to use the `prettier` binary from `node_modules`, use `"./node_modules/.bin/prettier"`. |
| 1070 | + Use a string instead of a path to avoid having to Git track the file in projects that use Nix flakes. |
| 1071 | + ''; |
| 1072 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
1052 | 1073 | default = null;
|
1053 | 1074 | defaultText = lib.literalExpression ''
|
1054 | 1075 | "''${tools.prettier}/bin/prettier"
|
1055 | 1076 | '';
|
| 1077 | + example = lib.literalExpression '' |
| 1078 | + "./node_modules/.bin/prettier" |
| 1079 | + ''; |
1056 | 1080 | };
|
1057 | 1081 | allow-parens =
|
1058 | 1082 | mkOption {
|
|
1137 | 1161 | description = "Path to a file containing patterns that describe files to ignore.
|
1138 | 1162 | By default, prettier looks for `./.gitignore` and `./.prettierignore`.
|
1139 | 1163 | Multiple values are accepted.";
|
1140 |
| - type = types.listOf types.path; |
| 1164 | + type = types.listOf (types.oneOf [ types.str types.path ]); |
1141 | 1165 | default = [ ];
|
1142 | 1166 | };
|
1143 | 1167 | ignore-unknown =
|
|
1307 | 1331 | binPath =
|
1308 | 1332 | mkOption {
|
1309 | 1333 | type = types.nullOr types.str;
|
1310 |
| - description = "Pylint binary path. Should be used to specify Pylint binary from your Nix-managed Python environment."; |
| 1334 | + description = "Pylint binary path. Should be used to specify Pylint binary from your Python environment."; |
1311 | 1335 | default = null;
|
1312 | 1336 | defaultText = lib.literalExpression ''
|
1313 | 1337 | "''${tools.pylint}/bin/pylint"
|
|
1353 | 1377 | binPath =
|
1354 | 1378 | mkOption {
|
1355 | 1379 | type = types.nullOr types.str;
|
1356 |
| - description = "pyupgrade binary path. Should be used to specify the pyupgrade binary from your Nix-managed Python environment."; |
| 1380 | + description = "pyupgrade binary path. Should be used to specify the pyupgrade binary from your Python environment."; |
1357 | 1381 | default = null;
|
1358 | 1382 | defaultText = lib.literalExpression ''
|
1359 | 1383 | "''${tools.pyupgrade}/bin/pyupgrade"
|
@@ -1414,10 +1438,19 @@ in
|
1414 | 1438 | options.settings = {
|
1415 | 1439 | binPath =
|
1416 | 1440 | mkOption {
|
1417 |
| - type = types.nullOr types.path; |
1418 |
| - description = "`biome` binary path. E.g. if you want to use the `biome` in `node_modules`, use `./node_modules/.bin/biome`."; |
| 1441 | + type = types.nullOr (types.oneOf [ types.str types.path ]); |
| 1442 | + description = '' |
| 1443 | + `rome` binary path. |
| 1444 | + For example, if you want to use the `rome` binary from `node_modules`, use `"./node_modules/.bin/rome"`. |
| 1445 | + Use a string instead of a path to avoid having to Git track the file in projects that use Nix flakes. |
| 1446 | + ''; |
1419 | 1447 | default = null;
|
1420 |
| - defaultText = "\${tools.biome}/bin/biome"; |
| 1448 | + defaultText = lib.literalExpression '' |
| 1449 | + "''${tools.rome}/bin/rome |
| 1450 | + ''; |
| 1451 | + example = lib.literalExpression '' |
| 1452 | + "./node_modules/.bin/rome" |
| 1453 | + ''; |
1421 | 1454 | };
|
1422 | 1455 |
|
1423 | 1456 | write =
|
|
0 commit comments