From 651a2da9be1242e045ae76a2b86616214203d48f Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Tue, 8 Oct 2024 13:27:57 -0700 Subject: [PATCH] Update helix/ruff confs - Support autoformatting Javascript in Helix - Update Ruff to use modern config idioms --- .config/helix/languages.toml | 4 ++++ .config/ruff/pyproject.toml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml index 08ac411..af91d13 100644 --- a/.config/helix/languages.toml +++ b/.config/helix/languages.toml @@ -14,3 +14,7 @@ command = "ruff-lsp" [[language]] name = "markdown" soft-wrap.enable = true + +[[language]] +name = "javascript" +auto-format = true diff --git a/.config/ruff/pyproject.toml b/.config/ruff/pyproject.toml index 827b54b..297c888 100644 --- a/.config/ruff/pyproject.toml +++ b/.config/ruff/pyproject.toml @@ -9,7 +9,7 @@ preview = true # Dismissed selections: # - CPY: Copyright notice screamer; I don't care # - TD: Overly opinionated on FIXME/TODO format. FIX covers better -select = [ +lint.select = [ "ANN", # enforce type annotations "A", # prevent using keywords that clobber python builtins "ARG", # argument usage checking @@ -40,7 +40,7 @@ select = [ "W", # pycodestyle warnings ] -ignore = [ +lint.ignore = [ "ANN101", # No type hint for "self" - not necessary and makes noisy code "D203", # Blank line required before class docstring - conflicts with ruff's own formatter "D211", # No line before class, incompatible with D203 - one line before class