Skip to content

Commit ad5b013

Browse files
authored
chore: Switch to pnpm, dependency clean-up & simpler eslint config. (#14)
* use previously unused variables. * add tests for the utility types * change unnecessary anys into unknowns * update CI to use pnpm * use corepack
1 parent dcf50eb commit ad5b013

File tree

12 files changed

+2634
-7080
lines changed

12 files changed

+2634
-7080
lines changed

.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/coverage.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,23 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
os: [ubuntu-latest, windows-latest]
17-
node-version: [16.x, 20.x]
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
node-version: [16.x, 20.x, 22.x]
1818

1919
steps:
2020
- name: Checkout Code Repository
2121
uses: actions/checkout@v2
2222

23+
- uses: pnpm/action-setup@v4
24+
name: Install pnpm
25+
with:
26+
run_install: false
27+
2328
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
24-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
2530
with:
2631
node-version: ${{ matrix.node-version }}
27-
cache: 'npm'
32+
cache: 'pnpm'
2833

29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
34+
- run: pnpm i --frozen-lockfile
35+
- run: pnpm test

eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
...tseslint.configs.recommended,
9+
{
10+
ignores: ['dist'],
11+
},
12+
);

examples/dog/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ const dog: Dog = {
1818
age: 123,
1919
name: 'Spikey',
2020
};
21+
22+
console.log(dog);

examples/inferredShowcase/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ const dog: Dog = {
1616
name: 'Sammy',
1717
age: 15,
1818
};
19+
20+
console.log(dog);

0 commit comments

Comments
 (0)