Skip to content

chore(examples): fix ESLint violations in examples and add Node.js 24 to CI matrix#35

Merged
morozow merged 5 commits intodevelopfrom
fix/examples-linter-pre-release-fixes
Apr 14, 2026
Merged

chore(examples): fix ESLint violations in examples and add Node.js 24 to CI matrix#35
morozow merged 5 commits intodevelopfrom
fix/examples-linter-pre-release-fixes

Conversation

@morozow
Copy link
Copy Markdown
Owner

@morozow morozow commented Apr 14, 2026

Overview

Resolves 17 ESLint errors that caused CI lint step failure on the examples directory.

Changes

examples/.eslintrc.json (new) — ESLint configuration for the examples directory:

  • Sets sourceType: module to support ESM import/export syntax used by Next.js example files
  • Adds browser environment override for 07-electron-desktop-app/src/renderer/ (enables document, window globals)
  • Adds JSX parsing support for 09-next-webapp/ files (ecmaFeatures.jsx: true)
  • Configures no-unused-vars with argsIgnorePattern: ^_ and varsIgnorePattern: ^_|^[A-Z] for JSX component imports

examples/04-cli-tool/src/commands/count.js — removed unused formatPlain import (only formatTable is used)

examples/10-enterprise-platform/src/domains/orders/orders.service.js — removed unused ORDER_STATUSES import (only STATUS_TRANSITIONS is used)

examples/10-enterprise-platform/src/domains/users/users.service.js — renamed destructured passwordHash to _hash in two locations to satisfy no-unused-vars (the variable is intentionally discarded when returning safe user objects)

examples/10-enterprise-platform/src/shared/middleware/error-handler.js — added eslint-disable-next-line no-unused-vars for the Express error handler's 4th next parameter (Express requires the 4-argument signature to identify error middleware, but the parameter is not used in the body)

.github/workflows/ci.yml — added Node.js 24.x to the CI test matrix (18.x = minimum supported, 22.x = Active LTS, 24.x = Current)

morozow added 4 commits April 14, 2026 22:29
- Add comprehensive .eslintrc.json for examples directory with Node.js and ES2020 support
- Configure ESLint overrides for Electron renderer and Next.js environments
- Remove unused formatPlain import from CLI tool count command
- Remove unused ORDER_STATUSES import from orders service
- Rename unused passwordHash variables to _hash in users service to follow convention
- Add ESLint disable comment for intentional unused next parameter in error handler
- Expand CI matrix to include Node.js 24.x for broader version coverage
- Increase minimum lockTimeoutMs arbitrary from 1 to 100ms to avoid race conditions with very small timeout values
- Replace lockTimeoutMs - delta calculation with Math.min(delta, Math.floor(lockTimeoutMs / 2)) to guarantee lock age stays well within timeout window
- Add clarifying comments explaining why lockTimeoutMs / 2 is used to prevent Date.now() drift between test setup and isTimedOut() check from causing flaky failures
- Apply timing fix consistently across both non-stale detection test cases (standard and CI environments)
- Add assertion to verify stdout is not empty before parsing JSON
- Guard against child_process stdout not being fully flushed on CI
- Prevents parsing errors on Node 18 + macOS ARM64 runners
- Ensures test reliability across different CI environments
…dation

- Add early exit condition when B contains scalar value at merge key
- Skip subtree traversal when B's scalar replaces A's entire object structure
- Prevent false negatives in property test by handling scalar-over-object replacement
- Ensures merge priority rules are correctly validated during deep object merging
@morozow morozow self-assigned this Apr 14, 2026
@morozow morozow added bug Something isn't working invalid This doesn't seem right labels Apr 14, 2026
@morozow morozow merged commit 8907882 into develop Apr 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant