Skip to content

Commit 8e2739f

Browse files
authored
chore: add .editorconfig + .nvmrc (Node 22), CI reads node-version-file (#14)
- .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
1 parent 20c9e71 commit 8e2739f

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 2
10+
11+
# Markdown uses trailing whitespace for hard line breaks.
12+
[*.md]
13+
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v6
1818
with:
19-
node-version: '20'
19+
node-version-file: '.nvmrc'
2020
cache: 'npm'
2121

2222
- name: Install dependencies

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v6
2525
with:
26-
node-version: '20'
26+
node-version-file: '.nvmrc'
2727
registry-url: 'https://registry.npmjs.org'
2828

2929
# Trusted Publishing requires npm >= 11.5.1; Node 20 ships with npm 10.x.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

0 commit comments

Comments
 (0)