diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..23986b6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space + +[*.json] +indent_style = tab +indent_size = tab diff --git a/.github/renovate.json b/.github/renovate.json index 3efddad..4b9825f 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,6 +1,6 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "github>piraattipuolue/.github:renovate-config" - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>piraattipuolue/.github:renovate-config" + ] } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61750d5..c4cb98e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,42 +1,73 @@ ci: + # Forĝejo/Gitea mirrors will autoclose pull requests. This should decrease + # the frequency of unnecessary PRs. + # https://github.com/pre-commit-ci/issues/issues/83 autoupdate_schedule: quarterly - skip: [pnpm-install-dev, prettier] + skip: ["prettier"] + +default_language_version: + node: "lts" + # Remember .python-version ! + python: "3.12" + ruby: ".ruby-version" repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: trailing-whitespace - args: ["--markdown-linebreak-ext", "md,markdown"] - exclude_types: [svg, tsv] - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files - - id: check-case-conflict - - id: check-json - - id: fix-byte-order-marker - - id: check-merge-conflict - - id: mixed-line-ending - args: [--fix=auto] - - id: pretty-format-json - args: [--autofix, --no-ensure-ascii] - - repo: https://github.com/thlorenz/doctoc rev: v2.2.0 hooks: - id: doctoc args: [--update-only, --notitle] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + args: ["--markdown-linebreak-ext", "md,markdown"] + 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, + --top-keys, + "Name,name", + ] + + - 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: pnpm-install-dev - name: Install pnpm dev dependencies - entry: corepack pnpm install -D - language: system - always_run: true - #verbose: true - pass_filenames: false - 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 + rev: "2.7.3" + hooks: + - id: editorconfig-checker + alias: ec + args: [-disable-max-line-length] diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 64efadc..0000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "proseWrap": "always", - "singleAttributePerLine": true, - "plugins": ["@prettier/plugin-xml", "prettier-plugin-sh"], - "overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }] -} diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..a0891f5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.4 diff --git a/Gemfile b/Gemfile index 494d3ae..8d3e5ee 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,20 @@ -source 'https://rubygems.org' +source "https://rubygems.org" +ruby file: ".ruby-version" -gem 'jekyll' +gem "jekyll" -gem 'minima' +gem "minima" # gem "jekyll-theme-leap-day" # gem "jekyll-theme-minimal" group :jekyll_plugins do - gem 'jekyll-feed' - gem 'jekyll-seo-tag' - gem 'jekyll-sitemap' + gem "jekyll-feed" + gem "jekyll-seo-tag" + gem "jekyll-sitemap" end + +# Prettier Ruby +gem "prettier_print" +gem "syntax_tree" +gem "syntax_tree-haml" +gem "syntax_tree-rbs" diff --git a/Gemfile.lock b/Gemfile.lock index 5e39ecd..f6de23e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -12,9 +12,13 @@ GEM eventmachine (1.2.7) ffi (1.17.0-x86_64-linux-gnu) forwardable-extended (2.6.0) - google-protobuf (4.27.2-x86_64-linux) + google-protobuf (4.27.3-x86_64-linux) bigdecimal rake (>= 13) + haml (6.3.0) + temple (>= 0.8.2) + thor + tilt http_parser.rb (0.8.0) i18n (1.14.5) concurrent-ruby (~> 1.0) @@ -52,6 +56,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.0) mercenary (0.4.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) @@ -59,20 +64,36 @@ GEM jekyll-seo-tag (~> 2.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (6.0.0) + prettier_print (1.2.1) + public_suffix (6.0.1) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.1) + rbs (3.5.2) + logger + rexml (3.3.4) strscan rouge (4.3.0) safe_yaml (1.0.5) - sass-embedded (1.77.5-x86_64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) + sass-embedded (1.77.8-x86_64-linux-gnu) + google-protobuf (~> 4.26) strscan (3.1.0) + syntax_tree (6.2.0) + prettier_print (>= 1.2.0) + syntax_tree-haml (4.0.3) + haml (>= 5.2) + prettier_print (>= 1.2.1) + syntax_tree (>= 6.0.0) + syntax_tree-rbs (1.0.0) + prettier_print + rbs + syntax_tree (>= 2.0.1) + temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) + thor (1.3.1) + tilt (2.4.0) unicode-display_width (2.5.0) webrick (1.8.1) @@ -85,6 +106,13 @@ DEPENDENCIES jekyll-seo-tag jekyll-sitemap minima + prettier_print + syntax_tree + syntax_tree-haml + syntax_tree-rbs + +RUBY VERSION + ruby 3.3.4p94 BUNDLED WITH - 2.5.9 + 2.5.11 diff --git a/_includes/footer.html b/_includes/footer.html index 3fba796..9664743 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -10,7 +10,7 @@