From 38b6629333e10ff4129c1ded0823d01c7bdade49 Mon Sep 17 00:00:00 2001 From: Isonimus <19539979+Isonimus@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:30:56 +0200 Subject: [PATCH] chore: add .editorconfig + .nvmrc (Node 22), CI reads node-version-file - .editorconfig: editor-level consistency (utf-8, lf, 2-space, final newline) - .nvmrc: pin Node 22 (current LTS; Node 20 is EOL) - ci.yml/publish.yml: node-version-file: .nvmrc instead of hardcoding 20 --- .editorconfig | 13 +++++++++++++ .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- .nvmrc | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 .nvmrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..808bf7e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +# Markdown uses trailing whitespace for hard line breaks. +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf9c562..b378ca0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: '20' + node-version-file: '.nvmrc' cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 67a60a0..cb9372e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: '20' + node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' # Trusted Publishing requires npm >= 11.5.1; Node 20 ships with npm 10.x. diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22