Skip to content

Commit 6c8fa55

Browse files
authored
fix: lint node import, migrate to pnpm, update deps (#11)
* fix: lint node import, migrate to pnpm, update deps * fix: lint
1 parent f9cdf1b commit 6c8fa55

File tree

9 files changed

+6919
-11770
lines changed

9 files changed

+6919
-11770
lines changed

.github/workflows/nodejs.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,40 @@ jobs:
88
node-version: [20.x, 22.x, 24.x]
99
steps:
1010
- uses: actions/checkout@v4
11+
- run: npm install -g corepack@latest
12+
- run: corepack enable
1113
- name: Use Node.js ${{ matrix.node-version }}
1214
uses: actions/setup-node@v4
1315
with:
1416
node-version: ${{ matrix.node-version }}
15-
- run: npm install
16-
- run: npm test
17+
cache: "pnpm"
18+
- run: pnpm i
19+
- run: pnpm test
1720

1821
build:
1922
runs-on: ubuntu-latest
2023
steps:
2124
- uses: actions/checkout@v4
25+
- run: npm install -g corepack@latest
26+
- run: corepack enable
2227
- uses: actions/setup-node@v4
2328
with:
2429
node-version: 24.x
25-
- run: npm install
26-
- run: npm run build
30+
cache: "pnpm"
31+
- run: pnpm i
32+
- run: pnpm build
2733

2834
are_the_types_wrong:
2935
name: Are The Types Wrong?
3036
runs-on: ubuntu-latest
3137
steps:
3238
- uses: actions/checkout@v4
39+
- run: npm install -g corepack@latest
40+
- run: corepack enable
3341
- uses: actions/setup-node@v4
3442
with:
3543
node-version: 24.x
36-
- run: npm install
37-
- run: npm run build
44+
cache: "pnpm"
45+
- run: pnpm i
46+
- run: pnpm build
3847
- run: npx --yes @arethetypeswrong/cli --pack . --profile esm-only

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
"**/dist": true,
55
"**/package-lock.json": true,
66
"**/pnpm-lock.yaml": true
7-
},
7+
}
88
}
9-

eslint.config.mjs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
import config from '@feathers-community/eslint-config'
22

3-
export default config({ tsconfig: { path: './tsconfig.eslint.json' } })
3+
export default config(
4+
{
5+
tsconfig: { path: './tsconfig.eslint.json' },
6+
},
7+
// additional rules for source files
8+
{
9+
files: ['src/**/*.ts'],
10+
ignores: ['**/*.test.ts'],
11+
rules: {
12+
'no-restricted-imports': [
13+
'error',
14+
{
15+
// "node:" protocol imports are not supported in some environments
16+
patterns: [{ regex: '^node:' }],
17+
},
18+
],
19+
},
20+
},
21+
)

0 commit comments

Comments
 (0)