Skip to content

Commit

Permalink
chore: update dependencies and lint config (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Feb 18, 2025
1 parent ecf2e3a commit 483417b
Show file tree
Hide file tree
Showing 17 changed files with 2,243 additions and 2,022 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: ci

on:
pull_request:
branches: main
branches: [main]
push:
branches: main
tags: v*
branches: [main]
tags: [v*]

jobs:
test:
Expand All @@ -16,11 +16,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: ['18', '20']
node-version: ['18', '20', '22']

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Upload coverage
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
with:
flag-name: node-${{ matrix.node-version }}-os-${{ matrix.os }}
parallel: true
Expand All @@ -42,7 +42,7 @@ jobs:
needs: test

steps:
- uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
with:
parallel-finished: true

Expand All @@ -52,7 +52,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Upload publish artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: npm-dist
path: dist
Expand All @@ -78,16 +78,16 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'
registry-url: https://registry.npmjs.org

- name: Download publish artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: npm-dist
path: dist
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
node_modules
tsconfig.vitest-temp.json
5 changes: 0 additions & 5 deletions .lintignore

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions codebook.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dictionaries = ["en_us"]
words = ["mcous"]
flag_words = []
ignore_paths = []
15 changes: 15 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import baseConfig from '@mcous/eslint-config'

export default [
...baseConfig,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
},
{
ignores: ['coverage', 'dist'],
},
]
4 changes: 2 additions & 2 deletions example/meaning-of-life.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { vi, describe, afterEach, it, expect } from 'vitest'
import { when, debug } from 'vitest-when'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { debug, when } from 'vitest-when'

import * as deepThought from './deep-thought.ts'
import * as earth from './earth.ts'
Expand Down
56 changes: 20 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,51 +30,33 @@
"src"
],
"scripts": {
"_eslint": "eslint --ignore-path .lintignore \"**/*.ts\"",
"_prettier": "prettier --ignore-path .lintignore \"**/*.@(ts|json|yaml|md)\"",
"all": "concurrently -g pnpm:coverage pnpm:build pnpm:check:*",
"build": "tsup --clean --sourcemap --dts --format esm --target node14 src/vitest-when.ts",
"build-and-check": "concurrently -g pnpm:build pnpm:check:*",
"check:format": "pnpm run _prettier --check",
"check:lint": "pnpm run _eslint",
"check:format": "prettier . --check",
"check:lint": "eslint .",
"check:types": "vitest --typecheck.only --run",
"coverage": "vitest run --coverage",
"format": "pnpm run _prettier --write && pnpm run _eslint --fix",
"format": "eslint . --fix && prettier . --write",
"test": "vitest"
},
"prettier": "@mcous/prettier-config",
"eslintConfig": {
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": "@mcous/eslint-config",
"rules": {
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowNumber": true
}
]
}
"dependencies": {
"pretty-format": "^29.7.0"
},
"devDependencies": {
"@mcous/eslint-config": "0.4.4",
"@mcous/prettier-config": "0.3.0",
"@mcous/typescript-config": "0.2.1",
"@typescript-eslint/eslint-plugin": "7.16.0",
"@typescript-eslint/parser": "7.16.0",
"@vitest/coverage-istanbul": "^3.0.2",
"@vitest/expect": "^3.0.2",
"@mcous/eslint-config": "^0.5.1",
"@mcous/prettier-config": "^0.3.0",
"@mcous/typescript-config": "^0.2.1",
"@types/node": "^22.13.4",
"@vitest/coverage-istanbul": "^3.0.5",
"@vitest/expect": "^3.0.5",
"concurrently": "^9.1.2",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-promise": "6.4.0",
"eslint-plugin-sonarjs": "0.24.0",
"eslint-plugin-unicorn": "51.0.1",
"prettier": "3.4.2",
"tsup": "^8.3.5",
"eslint": "^9.20.1",
"prettier": "^3.5.1",
"tsup": "^8.3.6",
"typescript": "5.7.3",
"vitest": "^3.0.2"
"vitest": "^3.0.5"
},
"peerDependencies": {
"@vitest/expect": ">=0.31.0 <4",
Expand All @@ -85,12 +67,14 @@
"optional": true
}
},
"packageManager": "pnpm@8.15.8+sha256.691fe176eea9a8a80df20e4976f3dfb44a04841ceb885638fe2a26174f81e65e",
"packageManager": "pnpm@10.4.1+sha256.4b702887986995933d4300836b04d6d02a43bc72b52e4f7e93a4ca608b959197",
"publishConfig": {
"access": "public",
"provenance": true
},
"dependencies": {
"pretty-format": "^29.7.0"
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
}
}
Loading

0 comments on commit 483417b

Please sign in to comment.