Skip to content

Commit f25b6d7

Browse files
committed
chore(deps): Update to pnpm 11 and handle default minimumReleaseAge
1 parent 3f022f8 commit f25b6d7

6 files changed

Lines changed: 62 additions & 72 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ updates:
3636
interval: weekly
3737
time: '09:30'
3838
timezone: Europe/Zurich
39+
cooldown:
40+
default-days: 1 # Match pnpm 11 default minimumReleaseAge (1440 min = 1 day)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
pnpm-lock.yaml
55
*.tgz
66
dist
7+
CLAUDE.md

.vscode/settings.json

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

AGENTS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is `@iwf-web/eslint-coding-standard`, an npm package providing standardized ESLint configurations for IWF projects. It wraps `@antfu/eslint-config` with IWF-specific customizations for TypeScript and React.
8+
9+
## Commands
10+
11+
```bash
12+
pnpm build # Transpile src/ to ESM in dist/ + generate .d.mts types (tsdown --clean --dts)
13+
pnpm prepack # Same as build, via @antfu/ni (`nr build`); runs automatically on publish
14+
pnpm lint # Lint the codebase (dogfoods this package's own config)
15+
pnpm lint:fix # Lint and auto-fix
16+
pnpm ts:check # Type check (tsc --noEmit)
17+
```
18+
19+
Note: `pnpm test` is a placeholder that errors — tests are not yet implemented.
20+
21+
## Architecture
22+
23+
The package exports two configs from separate entry points:
24+
25+
- **`iwfWebStandardTs`** (`src/standard-ts.ts`) — Full config with TypeScript strict checking, React, and all style rules. Imports `baseOptions`/`baseRules` from the JS config and layers on `tsRules`.
26+
- **`iwfWebStandardJs`** (`src/standard-js.ts`) — Base config with React and style rules, without TypeScript. Defines and exports `baseOptions` and `baseRules`.
27+
- **`src/index.ts`** — Barrel re-export of both configs.
28+
29+
Both functions accept `(options?, ...userConfigs)``options` shallow-merge over the IWF `baseOptions` (and override `antfu()` defaults), `userConfigs` are additional ESLint flat config objects appended after the IWF rules. Each module also exports a deprecated alias (`iwfStandardTs`/`iwfStandardJs`) kept for backward compat — slated for removal in the next major version (search `TODO: Remove`).
30+
31+
`eslint.config.ts` at the repo root applies `iwfWebStandardTs()` to this repo itself, so linting changes here is the primary way to verify the config behaves as intended.
32+
33+
### Consumer usage
34+
35+
```typescript
36+
import { iwfWebStandardTs } from '@iwf-web/eslint-coding-standard';
37+
export default iwfWebStandardTs();
38+
// Subpath imports also available: '@iwf-web/eslint-coding-standard/standard-ts'
39+
```
40+
41+
## Code Style Enforced by This Config
42+
43+
Defined in `baseRules` (`src/standard-js.ts`) and `tsRules` (`src/standard-ts.ts`); each rule carries an inline comment explaining its rationale. Highlights:
44+
45+
- Semicolons required; curly braces required for all control statements
46+
- 120 char line length (warning; ignores comments/strings)
47+
- Single quotes, 2-space indentation, no spaces inside object braces (`{foo: bar}`)
48+
- Arrow function params always parenthesized; object props quoted only as needed
49+
- TS: relaxed `any` restrictions for third-party interop, promises allowed in event handlers
50+
- React: hooks linting on, common children-manipulation patterns allowed
51+
52+
## Build & Release
53+
54+
- **tsdown**: Builds ESM-only output to `dist/` with declarations. Entry points configured in `tsdown.config.ts`. `exports: true` auto-syncs `package.json` exports — do not hand-edit the `exports` field.
55+
- **pnpm**: Required package manager (version locked via `packageManager`).
56+
- **Conventional Commits**: Drive automated releases via release-please (`release-please-config.json`, `.release-please-manifest.json`).
57+
- **Node 18+** required by consumers; dev container uses Node 24.

CLAUDE.md

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"dependencies": {
4444
"@antfu/eslint-config": "^9.0.0",
45-
"@eslint-react/eslint-plugin": "^5.8.16",
45+
"@eslint-react/eslint-plugin": "^5.0.0",
4646
"eslint-plugin-react-hooks": "^7.0.0",
4747
"eslint-plugin-react-refresh": "^0.5.0"
4848
},
@@ -54,5 +54,5 @@
5454
"tsdown": "^0.22.2",
5555
"typescript": "^5.0.0"
5656
},
57-
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319"
57+
"packageManager": "pnpm@11.5.2+sha512.71c631e382066efc25625d5cf029075de07b61b37f6e27350fbd84b1bda5864c8c1967adc280776b45c30a715c0359a3be08fef42d5bb09e2b99029979692916"
5858
}

0 commit comments

Comments
 (0)