diff --git a/.editorconfig b/.editorconfig index 5d01666..1e2ed95 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,8 +9,9 @@ indent_style = space indent_size = 2 max_line_length = 78 -[.prettierrc] +[.json] indent_style = tab +indent_size = tab [{LICENSE,*.{markdown,md}}] trim_trailing_whitespace = false diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..5455cb1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +manage-package-manager-versions=true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17de007..8df7b08 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ -# @format - +# See https://pre-commit.com for more information +# See https://pre-commit.ci for more information ci: # Forĝejo/Gitea mirrors will autoclose pull requests. This should decrease # the frequency of unnecessary PRs. @@ -8,7 +8,10 @@ ci: skip: [prettier] default_language_version: - python: pypy3 + node: "lts" + # Remember .python-version ! + python: "3.12" + ruby: ".ruby-version" repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -16,21 +19,39 @@ repos: hooks: - id: trailing-whitespace args: ["--markdown-linebreak-ext", "md"] - - id: end-of-file-fixer + exclude_types: [svg, tsv] + #- id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - id: check-case-conflict - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict - id: check-shebang-scripts-are-executable + - id: check-toml + - id: check-xml - id: destroyed-symlinks - id: detect-private-key - id: fix-byte-order-marker + - id: check-merge-conflict + - id: mixed-line-ending + args: [--fix=auto] + - id: pretty-format-json + args: + # Remember also: --no-sort-keys + # ASCII excludes the älphäbet amongst others + [--autofix, --indent, "\t", --no-ensure-ascii] + + - repo: https://github.com/pre-commit-ci/pre-commit-ci-config + rev: v1.6.1 + hooks: + - id: check-pre-commit-ci-config - repo: local hooks: - id: prettier name: prettier - entry: corepack pnpm exec prettier --cache --ignore-unknown --write + entry: corepack pnpx prettier --cache --ignore-unknown --write language: system - repo: https://github.com/editorconfig-checker/editorconfig-checker.python diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a6c57f5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.json diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 7a8c0bc..0000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "insertPragma": true, - "proseWrap": "always", - "singleAttributePerLine": true, - "plugins": ["prettier-plugin-sh"], - "overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }] -} diff --git a/package.json b/package.json index 6b53745..9b0393c 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": { + "@aminda/global-prettier-config": "2024.28.4" + }, + "packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf", + "prettier": "@aminda/global-prettier-config" }