mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-08 13:13:55 +00:00
languages/formatters: allow multiple formatters (#1103)
* language/python: allow multiple formatters * package: add prettier-plugin-astro * language/astro: fix prettier, remove prettierd * package: add prettier-plugin-svelte * language/svelte: fix prettier, remove prettierd * languages: allow listOf format.type * deprecations: add warnings for removed format options * ruby: remove unused variable * nix: fix outdated references to format.package * docs: update release note * treewide: warn deprecation in singleOrListOf * conform: add definitions for setupOpts.formatters
This commit is contained in:
parent
a87439ed3c
commit
d5da1a14c3
47 changed files with 641 additions and 488 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{lib}: let
|
||||
inherit (builtins) warn toJSON;
|
||||
inherit (lib.options) mergeEqualOption;
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (lib.strings) isString stringLength match;
|
||||
|
|
@ -27,5 +28,14 @@ in {
|
|||
check = v: isString v && (match "#?[0-9a-fA-F]{6}" v) != null;
|
||||
};
|
||||
|
||||
singleOrListOf = t: coercedTo t singleton (listOf t);
|
||||
# no compound types please
|
||||
deprecatedSingleOrListOf = option: t:
|
||||
coercedTo
|
||||
t
|
||||
(x:
|
||||
warn ''
|
||||
${option} no longer accepts non-list values, use [${toJSON x}] instead
|
||||
''
|
||||
(singleton x))
|
||||
(listOf t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ in {
|
|||
inherit (typesDag) dagOf;
|
||||
inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType;
|
||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
||||
inherit (customTypes) char hexColor mergelessListOf singleOrListOf;
|
||||
inherit (customTypes) char hexColor mergelessListOf deprecatedSingleOrListOf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue