Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
- name: Build
run: pnpm run build

- name: Verify packed package
if: matrix.node == 22
run: pnpm run package:check

- name: Upload coverage
if: matrix.node == 22
uses: codecov/codecov-action@v4
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,8 @@ jobs:

- run: pnpm install --frozen-lockfile

- name: Typecheck
run: pnpm run typecheck

- name: Lint
run: pnpm run lint

- name: Test
run: pnpm run test:run
- name: Verify release contract
run: pnpm run release:check

- name: Verify tag matches package.json version
run: |
Expand All @@ -43,9 +37,6 @@ jobs:
exit 1
fi

- name: Build
run: pnpm run build

- name: Publish to npm
# Tag checkouts use a detached HEAD, so pnpm's branch check cannot apply;
# the explicit tag/package-version check above remains authoritative.
Expand Down
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ export default [
"@typescript-eslint/no-invalid-void-type": "off",
},
},
{
...tseslint.configs.disableTypeChecked,
files: ["scripts/**/*.mjs", "scripts/**/*.ts"],
rules: {
...tseslint.configs.disableTypeChecked.rules,
"@typescript-eslint/explicit-function-return-type": "off",
"no-console": "off",
"no-undef": "off",
},
},
prettier,
{
rules: {
Expand Down
24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
},
"sideEffects": false,
Expand All @@ -22,16 +27,18 @@
],
"scripts": {
"build": "tsup",
"package:check": "node scripts/check-packed-package.mjs && attw --pack . && publint",
"release:check": "pnpm run check && pnpm run build-storybook && pnpm run package:check",
"dev": "tsup --watch",
"clean": "rm -rf dist",
"prepublishOnly": "pnpm run clean && pnpm run build",
"typecheck": "tsc --noEmit",
"typecheck:examples": "tsc --project tsconfig.examples.json",
"lint": "eslint src --ext .ts,.tsx",
"lint": "eslint src scripts --ext .ts,.tsx,.mjs",
"lint:fix": "eslint src --ext .ts,.tsx --fix",
"check": "pnpm run lint && pnpm run typecheck && pnpm run typecheck:examples && pnpm run test:run && pnpm run build",
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
"check": "pnpm run lint && pnpm run format:check && pnpm run typecheck && pnpm run typecheck:examples && pnpm run test:run && pnpm run build",
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"scripts/**/*.{mjs,ts}\" \"*.{json,ts,mjs}\" \".github/workflows/*.yml\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx}\" \"scripts/**/*.{mjs,ts}\" \"*.{json,ts,mjs}\" \".github/workflows/*.yml\"",
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
Expand Down Expand Up @@ -62,6 +69,7 @@
"react": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",
"@eslint/js": "^9.39.1",
"@storybook/addon-docs": "10.2.16",
"@storybook/react-vite": "10.2.16",
Expand All @@ -74,13 +82,15 @@
"@typescript-eslint/eslint-plugin": "^8.46.4",
"@typescript-eslint/parser": "^8.46.4",
"@vitest/coverage-v8": "^4.1.11",
"esbuild": "0.27.7",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"happy-dom": "^20.0.10",
"prettier": "^3.6.2",
"publint": "^0.3.24",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"remark-gfm": "^4.0.1",
Expand Down
Loading
Loading