Refactor eslint - #200
Conversation
…ith 17 updates Bumps the dev-dependencies group with 16 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@codedependant/semantic-release-docker](https://github.com/esatterwhite/semantic-release-docker) | `5.1.1` | `7.0.0` | | [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.39.2` | `10.0.1` | | [@semantic-release/github](https://github.com/semantic-release/github) | `12.0.3` | `12.0.8` | | [@semantic-release/npm](https://github.com/semantic-release/npm) | `13.1.3` | `13.1.5` | | [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator) | `14.1.0` | `14.1.1` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.2.0` | `25.6.2` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.54.0` | `8.59.2` | | [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.3.0` | | [eslint-plugin-security](https://github.com/eslint-community/eslint-plugin-security) | `3.0.1` | `4.0.0` | | [globals](https://github.com/sindresorhus/globals) | `17.3.0` | `17.6.0` | | [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `30.2.0` | `30.4.2` | | [msw](https://github.com/mswjs/msw) | `2.12.7` | `2.14.6` | | [openapi-typescript](https://github.com/openapi-ts/openapi-typescript/tree/HEAD/packages/openapi-typescript) | `7.10.1` | `7.13.0` | | [prettier](https://github.com/prettier/prettier) | `3.8.1` | `3.8.3` | | [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.4.6` | `29.4.9` | | [typescript](https://github.com/microsoft/TypeScript) | `5.9.3` | `6.0.3` | Updates `@codedependant/semantic-release-docker` from 5.1.1 to 7.0.0 - [Release notes](https://github.com/esatterwhite/semantic-release-docker/releases) - [Changelog](https://github.com/esatterwhite/semantic-release-docker/blob/main/CHANGELOG.md) - [Commits](esatterwhite/semantic-release-docker@v5.1.1...v7.0.0) Updates `@eslint/js` from 9.39.2 to 10.0.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js) Updates `@semantic-release/github` from 12.0.3 to 12.0.8 - [Release notes](https://github.com/semantic-release/github/releases) - [Commits](semantic-release/github@v12.0.3...v12.0.8) Updates `@semantic-release/npm` from 13.1.3 to 13.1.5 - [Release notes](https://github.com/semantic-release/npm/releases) - [Commits](semantic-release/npm@v13.1.3...v13.1.5) Updates `@semantic-release/release-notes-generator` from 14.1.0 to 14.1.1 - [Release notes](https://github.com/semantic-release/release-notes-generator/releases) - [Commits](semantic-release/release-notes-generator@v14.1.0...v14.1.1) Updates `@types/node` from 25.2.0 to 25.6.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 8.54.0 to 8.59.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.54.0 to 8.59.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.2/packages/parser) Updates `eslint` from 9.39.2 to 10.3.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v9.39.2...v10.3.0) Updates `eslint-plugin-security` from 3.0.1 to 4.0.0 - [Release notes](https://github.com/eslint-community/eslint-plugin-security/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-security/blob/main/CHANGELOG.md) - [Commits](eslint-community/eslint-plugin-security@v3.0.1...eslint-plugin-security-v4.0.0) Updates `globals` from 17.3.0 to 17.6.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v17.3.0...v17.6.0) Updates `jest` from 30.2.0 to 30.4.2 - [Release notes](https://github.com/jestjs/jest/releases) - [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jestjs/jest/commits/v30.4.2/packages/jest) Updates `msw` from 2.12.7 to 2.14.6 - [Release notes](https://github.com/mswjs/msw/releases) - [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md) - [Commits](mswjs/msw@v2.12.7...v2.14.6) Updates `openapi-typescript` from 7.10.1 to 7.13.0 - [Release notes](https://github.com/openapi-ts/openapi-typescript/releases) - [Changelog](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/CHANGELOG.md) - [Commits](https://github.com/openapi-ts/openapi-typescript/commits/openapi-typescript@7.13.0/packages/openapi-typescript) Updates `prettier` from 3.8.1 to 3.8.3 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.8.1...3.8.3) Updates `ts-jest` from 29.4.6 to 29.4.9 - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v29.4.6...v29.4.9) Updates `typescript` from 5.9.3 to 6.0.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v5.9.3...v6.0.3) --- updated-dependencies: - dependency-name: "@codedependant/semantic-release-docker" dependency-version: 7.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: "@eslint/js" dependency-version: 10.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: "@semantic-release/github" dependency-version: 12.0.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: "@semantic-release/npm" dependency-version: 13.1.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: "@semantic-release/release-notes-generator" dependency-version: 14.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: "@types/node" dependency-version: 25.6.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.59.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: "@typescript-eslint/parser" dependency-version: 8.59.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: eslint dependency-version: 10.3.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: eslint-plugin-security dependency-version: 4.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: globals dependency-version: 17.6.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: jest dependency-version: 30.4.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: msw dependency-version: 2.14.6 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: openapi-typescript dependency-version: 7.13.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: prettier dependency-version: 3.8.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: ts-jest dependency-version: 29.4.9 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: typescript dependency-version: 6.0.3 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
⚠️ Not ready to approve
The new cause attachment in production code sets non-standard property descriptors (enumerable/non-writable), and the toolchain bump would benefit from explicitly declaring the required Node version to avoid unsupported installs.
Pull request overview
This PR updates the repository’s TypeScript/ESLint toolchain compatibility by cleaning up type assertions flagged by newer lint rules, preserving original error causes in a TS-target-compatible way, and updating TS config and dependency metadata to keep quality checks green.
Changes:
- Remove redundant type assertions across handlers/services and unit tests.
- Preserve original thrown errors via
Error.cause(implemented usingObject.defineProperty) in the spec loader and e2e parsing helpers. - Update TypeScript configuration and bump toolchain-related dependencies (plus lockfile refresh).
File summaries
| File | Description |
|---|---|
| tsconfig.json | Adds ignoreDeprecations to silence TS 6.x deprecation warnings. |
| src/services/spec-loader.ts | Removes a type assertion on loaded spec and attaches original error as cause on failures. |
| src/services/reference-transform.ts | Removes a cast when registering transformers under stricter lint rules. |
| src/handlers/handler-utils.ts | Simplifies property access and removes return type assertions. |
| src/config.ts | Removes an output format assertion after runtime validation. |
| test/tests/unit/handlers/top-level-field-handler.test.ts | Removes redundant mock type assertion. |
| test/tests/unit/handlers/path-item-handler.test.ts | Removes redundant mock type assertion. |
| test/tests/unit/handlers/operation-handler.test.ts | Removes redundant mock type assertion. |
| test/tests/unit/handlers/component-map-handler.test.ts | Removes redundant mock type assertion. |
| test/tests/unit/handlers/component-detail-handler.test.ts | Removes redundant mock type assertion. |
| test/tests/e2e/spec-loading.test.ts | Preserves parse error cause when JSON parsing fails. |
| test/tests/e2e/resources.test.ts | Preserves parse error cause when JSON parsing fails. |
| test/tests/e2e/format.test.ts | Preserves parse error cause when JSON/YAML parsing fails. |
| package.json | Bumps ESLint/toolchain deps and TypeScript, removes openapi-typescript. |
| package-lock.json | Lockfile updates reflecting the toolchain dependency changes. |
Review details
- Files reviewed: 13/15 changed files
- Comments generated: 2
- Review effort level: Low
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…de.js version compatibility
Summary
This PR updates the project to restore compatibility with the newer ESLint toolchain and keeps the repository’s quality checks green.
What changed
Why
The dependency update surfaced a set of lint issues that were previously not enforced or surfaced differently. This change brings the codebase back in line with the current linting standards and ensures the existing quality gates continue to pass.
Verification
The following checks were run successfully:
just allnpm run lintnpm run buildnpm run test:coverage