Skip to content

Commit

Permalink
chore: Switch to pnpm, dependency clean-up & simpler eslint config. (#14
Browse files Browse the repository at this point in the history
)

* use previously unused variables.
* add tests for the utility types
* change unnecessary anys into unknowns
* update CI to use pnpm
* use corepack
  • Loading branch information
iwoplaza authored Jul 2, 2024
1 parent dcf50eb commit ad5b013
Show file tree
Hide file tree
Showing 12 changed files with 2,634 additions and 7,080 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

18 changes: 11 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [16.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.x, 20.x, 22.x]

steps:
- name: Checkout Code Repository
uses: actions/checkout@v2

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'pnpm'

- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: pnpm i --frozen-lockfile
- run: pnpm test
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['dist'],
},
);
2 changes: 2 additions & 0 deletions examples/dog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ const dog: Dog = {
age: 123,
name: 'Spikey',
};

console.log(dog);
2 changes: 2 additions & 0 deletions examples/inferredShowcase/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ const dog: Dog = {
name: 'Sammy',
age: 15,
};

console.log(dog);
Loading

0 comments on commit ad5b013

Please sign in to comment.