Skip to content

Commit 483417b

Browse files
authored
chore: update dependencies and lint config (#20)
1 parent ecf2e3a commit 483417b

17 files changed

+2243
-2022
lines changed

.github/workflows/ci.yaml

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: ci
22

33
on:
44
pull_request:
5-
branches: main
5+
branches: [main]
66
push:
7-
branches: main
8-
tags: v*
7+
branches: [main]
8+
tags: [v*]
99

1010
jobs:
1111
test:
@@ -16,11 +16,11 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
19-
node-version: ['18', '20']
19+
node-version: ['18', '20', '22']
2020

2121
steps:
2222
- name: Checkout source
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Install Node.js and dependencies
2626
uses: mcous/js/actions/setup@main
@@ -31,7 +31,7 @@ jobs:
3131
run: pnpm coverage
3232

3333
- name: Upload coverage
34-
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
34+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
3535
with:
3636
flag-name: node-${{ matrix.node-version }}-os-${{ matrix.os }}
3737
parallel: true
@@ -42,7 +42,7 @@ jobs:
4242
needs: test
4343

4444
steps:
45-
- uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
45+
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
4646
with:
4747
parallel-finished: true
4848

@@ -52,7 +52,7 @@ jobs:
5252

5353
steps:
5454
- name: Checkout source
55-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
5656

5757
- name: Install Node.js and dependencies
5858
uses: mcous/js/actions/setup@main
@@ -61,7 +61,7 @@ jobs:
6161
run: pnpm build-and-check
6262

6363
- name: Upload publish artifact
64-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6565
with:
6666
name: npm-dist
6767
path: dist
@@ -78,16 +78,16 @@ jobs:
7878

7979
steps:
8080
- name: Checkout source
81-
uses: actions/checkout@v3
81+
uses: actions/checkout@v4
8282

8383
- name: Install Node.js
84-
uses: actions/setup-node@v3
84+
uses: actions/setup-node@v4
8585
with:
86-
node-version: '18'
86+
node-version: '22'
8787
registry-url: https://registry.npmjs.org
8888

8989
- name: Download publish artifact
90-
uses: actions/download-artifact@v3
90+
uses: actions/download-artifact@v4
9191
with:
9292
name: npm-dist
9393
path: dist

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
coverage
22
dist
33
node_modules
4+
tsconfig.vitest-temp.json

.lintignore

-5
This file was deleted.

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm-lock.yaml

codebook.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dictionaries = ["en_us"]
2+
words = ["mcous"]
3+
flag_words = []
4+
ignore_paths = []

eslint.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import baseConfig from '@mcous/eslint-config'
2+
3+
export default [
4+
...baseConfig,
5+
{
6+
languageOptions: {
7+
parserOptions: {
8+
tsconfigRootDir: import.meta.dirname,
9+
},
10+
},
11+
},
12+
{
13+
ignores: ['coverage', 'dist'],
14+
},
15+
]

example/meaning-of-life.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { vi, describe, afterEach, it, expect } from 'vitest'
2-
import { when, debug } from 'vitest-when'
1+
import { afterEach, describe, expect, it, vi } from 'vitest'
2+
import { debug, when } from 'vitest-when'
33

44
import * as deepThought from './deep-thought.ts'
55
import * as earth from './earth.ts'

package.json

+20-36
Original file line numberDiff line numberDiff line change
@@ -30,51 +30,33 @@
3030
"src"
3131
],
3232
"scripts": {
33-
"_eslint": "eslint --ignore-path .lintignore \"**/*.ts\"",
34-
"_prettier": "prettier --ignore-path .lintignore \"**/*.@(ts|json|yaml|md)\"",
3533
"all": "concurrently -g pnpm:coverage pnpm:build pnpm:check:*",
3634
"build": "tsup --clean --sourcemap --dts --format esm --target node14 src/vitest-when.ts",
3735
"build-and-check": "concurrently -g pnpm:build pnpm:check:*",
38-
"check:format": "pnpm run _prettier --check",
39-
"check:lint": "pnpm run _eslint",
36+
"check:format": "prettier . --check",
37+
"check:lint": "eslint .",
4038
"check:types": "vitest --typecheck.only --run",
4139
"coverage": "vitest run --coverage",
42-
"format": "pnpm run _prettier --write && pnpm run _eslint --fix",
40+
"format": "eslint . --fix && prettier . --write",
4341
"test": "vitest"
4442
},
4543
"prettier": "@mcous/prettier-config",
46-
"eslintConfig": {
47-
"parserOptions": {
48-
"project": "./tsconfig.json"
49-
},
50-
"extends": "@mcous/eslint-config",
51-
"rules": {
52-
"@typescript-eslint/restrict-template-expressions": [
53-
"error",
54-
{
55-
"allowNumber": true
56-
}
57-
]
58-
}
44+
"dependencies": {
45+
"pretty-format": "^29.7.0"
5946
},
6047
"devDependencies": {
61-
"@mcous/eslint-config": "0.4.4",
62-
"@mcous/prettier-config": "0.3.0",
63-
"@mcous/typescript-config": "0.2.1",
64-
"@typescript-eslint/eslint-plugin": "7.16.0",
65-
"@typescript-eslint/parser": "7.16.0",
66-
"@vitest/coverage-istanbul": "^3.0.2",
67-
"@vitest/expect": "^3.0.2",
48+
"@mcous/eslint-config": "^0.5.1",
49+
"@mcous/prettier-config": "^0.3.0",
50+
"@mcous/typescript-config": "^0.2.1",
51+
"@types/node": "^22.13.4",
52+
"@vitest/coverage-istanbul": "^3.0.5",
53+
"@vitest/expect": "^3.0.5",
6854
"concurrently": "^9.1.2",
69-
"eslint": "8.57.1",
70-
"eslint-config-prettier": "9.1.0",
71-
"eslint-plugin-promise": "6.4.0",
72-
"eslint-plugin-sonarjs": "0.24.0",
73-
"eslint-plugin-unicorn": "51.0.1",
74-
"prettier": "3.4.2",
75-
"tsup": "^8.3.5",
55+
"eslint": "^9.20.1",
56+
"prettier": "^3.5.1",
57+
"tsup": "^8.3.6",
7658
"typescript": "5.7.3",
77-
"vitest": "^3.0.2"
59+
"vitest": "^3.0.5"
7860
},
7961
"peerDependencies": {
8062
"@vitest/expect": ">=0.31.0 <4",
@@ -85,12 +67,14 @@
8567
"optional": true
8668
}
8769
},
88-
"packageManager": "pnpm@8.15.8+sha256.691fe176eea9a8a80df20e4976f3dfb44a04841ceb885638fe2a26174f81e65e",
70+
"packageManager": "pnpm@10.4.1+sha256.4b702887986995933d4300836b04d6d02a43bc72b52e4f7e93a4ca608b959197",
8971
"publishConfig": {
9072
"access": "public",
9173
"provenance": true
9274
},
93-
"dependencies": {
94-
"pretty-format": "^29.7.0"
75+
"pnpm": {
76+
"onlyBuiltDependencies": [
77+
"esbuild"
78+
]
9579
}
9680
}

0 commit comments

Comments
 (0)