From 83b1fcaa57b1f5a92872f8291cde08a41a38b62c Mon Sep 17 00:00:00 2001 From: Mo8it Date: Thu, 1 Dec 2022 03:52:30 +0100 Subject: [PATCH] Add dprint JS --- .config/dprint.json | 12 +++++------- .config/helix/languages.toml | 5 +++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.config/dprint.json b/.config/dprint.json index 9d7121b..40521c9 100644 --- a/.config/dprint.json +++ b/.config/dprint.json @@ -1,14 +1,12 @@ { - "json": { - }, - "markdown": { - }, - "includes": ["**/*.{json,md}"], + "includes": ["**/*.{json,md,js}"], "excludes": [ - "**/*-lock.json" + "**/*-lock.json", + "**/node_modules" ], "plugins": [ "https://plugins.dprint.dev/json-0.16.0.wasm", - "https://plugins.dprint.dev/markdown-0.14.1.wasm" + "https://plugins.dprint.dev/markdown-0.14.2.wasm", + "https://plugins.dprint.dev/typescript-0.78.0.wasm" ] } diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml index 965fef7..89ad90d 100644 --- a/.config/helix/languages.toml +++ b/.config/helix/languages.toml @@ -19,6 +19,11 @@ name = "json" formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "json"] } auto-format = true +[[language]] +name = "javascript" +formatter = { command = "dprint", args = ["fmt", "-c", "/home/mo/.config/dprint.json", "--stdin", "js" ] } +auto-format = true + [[language]] name = "html" formatter = { command = "djlint", args = ["--reformat", "--quiet", "--preserve-blank-lines", "--format-css", "--format-js", "-"] }