From 0b11a40299adfa71011d13685c205d137a21d992 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 26 Sep 2024 18:00:10 +0100 Subject: [PATCH 1/3] Move `toml-sort` to `pyproject` --- .pre-commit-config.yaml | 5 ----- pyproject.toml | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cc56102..8778e73 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,11 +86,6 @@ repos: rev: v0.23.1 hooks: - id: toml-sort-fix - args: - - --all - - --in-place - - --spaces-indent-inline-array=4 - - --trailing-comma-inline-array - repo: https://github.com/rbubley/mirrors-prettier rev: v3.3.3 hooks: diff --git a/pyproject.toml b/pyproject.toml index eeff0df..3a6e140 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,5 +159,9 @@ lint.select = [ lint.mccabe.max-complexity = 18 [tool.tomlsort] +all = true +in_place = true +spaces_indent_inline_array = 4 +trailing_comma_inline_array = true overrides."project.classifiers".inline_arrays = false overrides."tool.ruff.lint.isort.section-order".inline_arrays = false From 2cdea6a24fa72fd57e414aab6daa58be85f9b104 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 27 Sep 2024 17:19:25 +0100 Subject: [PATCH 2/3] Move `yaml-lint` config to `.yamllint.yaml` --- .pre-commit-config.yaml | 40 ---------------------------------------- .yamllint.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 40 deletions(-) create mode 100644 .yamllint.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8778e73..e1e2a29 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,46 +30,6 @@ repos: hooks: - id: yamllint args: - - >- - --config-data={ - extends: default, - rules: { - anchors: enable, - braces: { - forbid: non-empty - }, - brackets: { - forbid: non-empty - }, - colons: enable, - commas: enable, - comments: { - min-spaces-from-content: 1 - }, - comments-indentation: enable, - document-end: disable, - document-start: enable, - empty-lines: enable, - empty-values: disable, - float-values: enable, - hyphens: enable, - indentation: enable, - key-duplicates: enable, - key-ordering: disable, - line-length: enable, - new-line-at-end-of-file: enable, - new-lines: enable, - octal-values: enable, - quoted-strings: { - quote-type: double, - required: only-when-needed - }, - trailing-spaces: enable, - truthy: { - check-keys: false - } - } - } - --strict - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.7 diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..3a0c657 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,33 @@ +--- +extends: default + +rules: + anchors: enable + braces: + forbid: non-empty + brackets: + forbid: non-empty + colons: enable + commas: enable + comments: + min-spaces-from-content: 1 + comments-indentation: enable + document-end: disable + document-start: enable + empty-lines: enable + empty-values: disable + float-values: enable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: enable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: enable + quoted-strings: + quote-type: double + required: only-when-needed + trailing-spaces: enable + truthy: + check-keys: false From 9ff01e020d53c0f904ab724d5ac278f69ca2a2fc Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 27 Sep 2024 17:22:13 +0100 Subject: [PATCH 3/3] More `prettier` to `.prettierrc.yaml` --- .pre-commit-config.yaml | 3 --- .prettierrc.yaml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 .prettierrc.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1e2a29..491a0a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,6 +50,3 @@ repos: rev: v3.3.3 hooks: - id: prettier - args: - - --prose-wrap=always - - --quote-props=as-needed diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..3204891 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,3 @@ +--- +proseWrap: always +quoteProps: as-needed