From 5f28b399080600741ece32f9bb5d94e438b4dd46 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sun, 7 Jul 2024 09:09:16 +0300 Subject: [PATCH] fix and run pre-commit configuration --- .editorconfig | 2 +- .gitignore | 1 + .pre-commit-config.yaml | 24 ++++++++++++------------ .prettierignore | 1 + package.json | 10 +++++----- renovate-config.json | 4 +++- 6 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 .prettierignore diff --git a/.editorconfig b/.editorconfig index 11f52d0..d2a08f5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ charset = utf-8 indent_style = tab indent_size = tab -[*.{yaml,yml,cff}] +[*.{yaml,yml,cff,json}] indent_style = space indent_size = 2 diff --git a/.gitignore b/.gitignore index 48570a1..a0e5f46 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ !.gitignore !.pre-commit-config.yaml !.prettierrc +!.prettierignore !.nvmrc # Other ignores diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae33c59..94a8a52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,17 +11,20 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-yaml - - id: check-shebang-scripts-are-executable - - id: destroyed-symlinks - - id: detect-private-key - - id: end-of-file-fixer - - id: fix-byte-order-marker - id: trailing-whitespace args: ["--markdown-linebreak-ext", "md,markdown"] - exclude_types: [svg, tsv] + - id: check-yaml + - id: check-added-large-files + - id: check-case-conflict + - id: check-json + - id: check-merge-conflict + - id: destroyed-symlinks + - id: detect-private-key + - id: fix-byte-order-marker + - id: mixed-line-ending + args: [--fix=auto] + - id: pretty-format-json + args: [--autofix, --no-ensure-ascii] - repo: https://github.com/pre-commit-ci/pre-commit-ci-config rev: v1.6.1 @@ -47,9 +50,6 @@ repos: name: prettier entry: corepack pnpm exec prettier --cache --ignore-unknown --write language: system - # Better handled by pretty-format-json from pre-commit-hooks. - # Remember to have *.json in .prettierignore! - exclude_types: [json] - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: "2.7.3" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a6c57f5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.json diff --git a/package.json b/package.json index 8632290..6b53745 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "devDependencies": { - "prettier": "3.3.2", - "prettier-plugin-sh": "0.14.0" - }, - "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" + "devDependencies": { + "prettier": "3.3.2", + "prettier-plugin-sh": "0.14.0" + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" } diff --git a/renovate-config.json b/renovate-config.json index bba21c0..b897673 100644 --- a/renovate-config.json +++ b/renovate-config.json @@ -1,3 +1,5 @@ { - extends: ["github>Mikaela/shell-things:.renovate-shared"], + "extends": [ + "github>Mikaela/shell-things:.renovate-shared" + ] }