-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Jonas Chevalier <[email protected]> Signed-off-by: phanirithvij <[email protected]>
- Loading branch information
1 parent
f7c8b09
commit c772c53
Showing
15 changed files
with
408 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ lib, fetchurl }: | ||
let | ||
mkDprintPlugin = | ||
{ | ||
url, | ||
hash, | ||
pname, | ||
version, | ||
description, | ||
initConfig, | ||
updateUrl, | ||
license ? lib.licenses.mit, | ||
maintainers ? [ lib.maintainers.phanirithvij ], | ||
}: | ||
fetchurl { | ||
inherit hash url; | ||
name = "${pname}-${version}.wasm"; | ||
meta = { | ||
inherit | ||
description | ||
license | ||
maintainers | ||
; | ||
}; | ||
passthru = { | ||
updateScript = ./update-plugins.py; | ||
inherit initConfig updateUrl; | ||
}; | ||
}; | ||
inherit (lib) | ||
filterAttrs | ||
mapAttrs' | ||
nameValuePair | ||
removeSuffix | ||
; | ||
files = filterAttrs ( | ||
name: type: type == "regular" && name != "default.nix" && lib.hasSuffix ".nix" name | ||
) (builtins.readDir ./.); | ||
plugins = mapAttrs' ( | ||
name: _: | ||
nameValuePair (removeSuffix ".nix" name) (import (./. + "/${name}") { inherit mkDprintPlugin; }) | ||
) files; | ||
in | ||
plugins // { inherit mkDprintPlugin; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "Biome (JS/TS) wrapper plugin."; | ||
hash = "sha256-+zY+myazFAUxeNuWFigkvF4zpKBs+jzVYQT09jRWFKI="; | ||
initConfig = { | ||
configExcludes = [ "**/node_modules" ]; | ||
configKey = "biome"; | ||
fileExtensions = [ | ||
"ts" | ||
"tsx" | ||
"js" | ||
"jsx" | ||
"cjs" | ||
"mjs" | ||
]; | ||
}; | ||
pname = "dprint-plugin-biome"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/biome/latest.json"; | ||
url = "https://plugins.dprint.dev/biome-0.7.1.wasm"; | ||
version = "0.7.1"; | ||
} |
14 changes: 14 additions & 0 deletions
14
pkgs/by-name/dp/dprint/plugins/dprint-plugin-dockerfile.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "Dockerfile code formatter."; | ||
hash = "sha256-gsfMLa4zw8AblOS459ZS9OZrkGCQi5gBN+a3hvOsspk="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "dockerfile"; | ||
fileExtensions = [ "dockerfile" ]; | ||
}; | ||
pname = "dprint-plugin-dockerfile"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/dockerfile/latest.json"; | ||
url = "https://plugins.dprint.dev/dockerfile-0.3.2.wasm"; | ||
version = "0.3.2"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "JSON/JSONC code formatter."; | ||
hash = "sha256-Sw+HkUb4K2wrLuQRZibr8gOCR3Rz36IeId4Vd4LijmY="; | ||
initConfig = { | ||
configExcludes = [ "**/*-lock.json" ]; | ||
configKey = "json"; | ||
fileExtensions = [ "json" ]; | ||
}; | ||
pname = "dprint-plugin-json"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/json/latest.json"; | ||
url = "https://plugins.dprint.dev/json-0.19.4.wasm"; | ||
version = "0.19.4"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "Jupyter notebook code block formatter."; | ||
hash = "sha256-877CEZbMlj9cHkFtl16XCnan37SeEGUL3BHaUKUv8S4="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "jupyter"; | ||
fileExtensions = [ "ipynb" ]; | ||
}; | ||
pname = "dprint-plugin-jupyter"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/jupyter/latest.json"; | ||
url = "https://plugins.dprint.dev/jupyter-0.1.5.wasm"; | ||
version = "0.1.5"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "Markdown code formatter."; | ||
hash = "sha256-PIEN9UnYC8doJpdzS7M6QEHQNQtj7WwXAgvewPsTjqs="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "markdown"; | ||
fileExtensions = [ "md" ]; | ||
}; | ||
pname = "dprint-plugin-markdown"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/markdown/latest.json"; | ||
url = "https://plugins.dprint.dev/markdown-0.17.8.wasm"; | ||
version = "0.17.8"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "Ruff (Python) wrapper plugin."; | ||
hash = "sha256-15InHQgF9c0Js4yUJxmZ1oNj1O16FBU12u/GOoaSAJ8="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "ruff"; | ||
fileExtensions = [ | ||
"py" | ||
"pyi" | ||
]; | ||
}; | ||
pname = "dprint-plugin-ruff"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/ruff/latest.json"; | ||
url = "https://plugins.dprint.dev/ruff-0.3.9.wasm"; | ||
version = "0.3.9"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "TOML code formatter."; | ||
hash = "sha256-aDfo/sKfOeNpyfd/4N1LgL1bObTTnviYrA8T7M/1KNs="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "toml"; | ||
fileExtensions = [ "toml" ]; | ||
}; | ||
pname = "dprint-plugin-toml"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/toml/latest.json"; | ||
url = "https://plugins.dprint.dev/toml-0.6.3.wasm"; | ||
version = "0.6.3"; | ||
} |
21 changes: 21 additions & 0 deletions
21
pkgs/by-name/dp/dprint/plugins/dprint-plugin-typescript.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "TypeScript/JavaScript code formatter."; | ||
hash = "sha256-urgKQOjgkoDJCH/K7DWLJCkD0iH0Ok+rvrNDI0i4uS0="; | ||
initConfig = { | ||
configExcludes = [ "**/node_modules" ]; | ||
configKey = "typescript"; | ||
fileExtensions = [ | ||
"ts" | ||
"tsx" | ||
"js" | ||
"jsx" | ||
"cjs" | ||
"mjs" | ||
]; | ||
}; | ||
pname = "dprint-plugin-typescript"; | ||
updateUrl = "https://plugins.dprint.dev/dprint/typescript/latest.json"; | ||
url = "https://plugins.dprint.dev/typescript-0.93.3.wasm"; | ||
version = "0.93.3"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "CSS, SCSS, Sass and Less formatter."; | ||
hash = "sha256-zt7F1tgPhPAn+gtps6+JB5RtvjIZw2n/G85Bv6kazgU="; | ||
initConfig = { | ||
configExcludes = [ "**/node_modules" ]; | ||
configKey = "malva"; | ||
fileExtensions = [ | ||
"css" | ||
"scss" | ||
"sass" | ||
"less" | ||
]; | ||
}; | ||
pname = "g-plane-malva"; | ||
updateUrl = "https://plugins.dprint.dev/g-plane/malva/latest.json"; | ||
url = "https://plugins.dprint.dev/g-plane/malva-v0.11.1.wasm"; | ||
version = "0.11.1"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, and Vento formatter."; | ||
hash = "sha256-G8UnJbc+oZ60V3oi8W2SS6H06zEYfY3wpmSUp+1GF8k="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "markup"; | ||
fileExtensions = [ | ||
"html" | ||
"vue" | ||
"svelte" | ||
"astro" | ||
"jinja" | ||
"jinja2" | ||
"twig" | ||
"njk" | ||
"vto" | ||
]; | ||
}; | ||
pname = "g-plane-markup_fmt"; | ||
updateUrl = "https://plugins.dprint.dev/g-plane/markup_fmt/latest.json"; | ||
url = "https://plugins.dprint.dev/g-plane/markup_fmt-v0.18.0.wasm"; | ||
version = "0.18.0"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "GraphQL formatter."; | ||
hash = "sha256-PlQwpR0tMsghMrOX7is+anN57t9xa9weNtoWpc0E9ec="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "graphql"; | ||
fileExtensions = [ | ||
"graphql" | ||
"gql" | ||
]; | ||
}; | ||
pname = "g-plane-pretty_graphql"; | ||
updateUrl = "https://plugins.dprint.dev/g-plane/pretty_graphql/latest.json"; | ||
url = "https://plugins.dprint.dev/g-plane/pretty_graphql-v0.2.1.wasm"; | ||
version = "0.2.1"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ mkDprintPlugin }: | ||
mkDprintPlugin { | ||
description = "YAML formatter."; | ||
hash = "sha256-6ua021G7ZW7Ciwy/OHXTA1Joj9PGEx3SZGtvaA//gzo="; | ||
initConfig = { | ||
configExcludes = [ ]; | ||
configKey = "yaml"; | ||
fileExtensions = [ | ||
"yaml" | ||
"yml" | ||
]; | ||
}; | ||
pname = "g-plane-pretty_yaml"; | ||
updateUrl = "https://plugins.dprint.dev/g-plane/pretty_yaml/latest.json"; | ||
url = "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"; | ||
version = "0.5.0"; | ||
} |
Oops, something went wrong.