Skip to content

Commit 4839c2e

Browse files
committed
chore: release v1.24.2 with ESLint import/order rule, PostToolUse hook for Prettier formatting, updated assertions documentation, and dependency updates
1 parent 462525e commit 4839c2e

4 files changed

Lines changed: 34 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [1.24.2] - 2026-03-18
4+
5+
### Added
6+
7+
- **ESLint import/order:** `import/order` rule in `eslint.config.base.mjs` for consistent import declaration order (builtin → external → internal → parent → sibling → index) with alphabetize and path groups for `@/**`; auto-fix via `eslint --fix`. `sort-imports` kept with `ignoreDeclarationSort: true` for member order within named imports only.
8+
- **PostToolUse hook (Claude/Cursor):** `.claude/settings.json` config to run Prettier on edited `.ts`/`.tsx` files after Edit/Write tool use.
9+
10+
### Changed
11+
12+
- **Import order:** Sorted imports across source, tests, and config with `npm run lint:fix` to satisfy the new import/order rule.
13+
- **Assertions skill (references/assertions.md):** Do not use assertions in spec files—only in page `verify*` methods. Added good spec examples for readable tests.
14+
- **Tests:** Removed redundant add-to-cart test case.
15+
16+
### Fixed
17+
18+
- **lint-staged:** For staged `*.ts` files, lint-staged now runs `eslint --fix` then `eslint` so auto-fixable issues are applied in the index and remaining errors are reported (commit blocked until lint passes).
19+
320
## [1.24.1] - 2026-03-17
421

522
### Added

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vasu-playwright-utils",
3-
"version": "1.24.1",
3+
"version": "1.24.2",
44
"description": "Playwright Typescript Library with reusable utilities",
55
"main": "./dist/src/vasu-playwright-lib/index.js",
66
"types": "./dist/src/vasu-playwright-lib/index.d.ts",
@@ -68,7 +68,7 @@
6868
"eslint-import-resolver-typescript": "^4.4.4",
6969
"eslint-plugin-import": "^2.32.0",
7070
"eslint-plugin-jsdoc": "^62.8.0",
71-
"eslint-plugin-playwright": "^2.10.0",
71+
"eslint-plugin-playwright": "^2.10.1",
7272
"eslint-plugin-prettier": "^5.5.5",
7373
"husky": "^9.1.7",
7474
"lint-staged": "^16.4.0",

skills/vasu-playwright-utils/references/assertions.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
Source: `src/vasu-playwright-lib/utils/assert-utils.ts`
44

5-
## Key Principle
5+
## Using Assertions in Spec Files
66

7-
**Use assertions in page files, NOT in spec files.** Spec files should read like plain English — all assertion logic lives inside page-object `verify*` methods.
7+
**Do not use assertions in spec files.** Assertions are for building and verifying behaviour inside page objects (e.g. `verify*` methods). Spec files should only orchestrate steps and call those methods so the test reads like a clear, readable scenario.
88

9-
### Good Example
9+
### Good Example — Readable Spec (No Assertions in Spec)
1010

11-
**Spec file** — reads like a test plan, no assertions:
11+
The spec reads like a test plan; all assertions live in page files.
12+
13+
**Spec file** — plain English, no assertion utils:
1214

1315
```typescript
1416
test('Complete checkout flow', async () => {

0 commit comments

Comments
 (0)