Conversation
Signed-off-by: Arturo Reuschenbach Puncernau <reuschenbach@gmail.com>
🦋 Changeset detectedLatest commit: c2a3393 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The modern JSX compiler setting required by the issue marked as fixed remains missing.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Enables stricter TypeScript ESLint checks for the OAuth package and updates affected source and test typings.
Changes:
- Migrates OAuth to the shared Vite React TypeScript ESLint configuration.
- Types JSON responses, CommonJS interop, and request parameters.
- Replaces test
anyusages and adds a patch changeset.
| File | Description |
|---|---|
.changeset/oauth-eslint-strict-types.md |
Adds the OAuth patch changeset. |
packages/oauth/eslint.config.mjs |
Enables the stricter shared ESLint configuration. |
packages/oauth/src/oidcState.ts |
Types PKCE CommonJS interop. |
packages/oauth/src/oidcSession.ts |
Types parsed request parameters. |
packages/oauth/src/oidcConfig.ts |
Types discovery responses. |
packages/oauth/src/codeFlow.ts |
Types token endpoint responses. |
packages/oauth/__tests__/tokenSession.test.ts |
Replaces test any with session types. |
packages/oauth/__tests__/oidcSession.test.ts |
Types the tested session instance. |
packages/oauth/__tests__/mockedSession.test.ts |
Types asymmetric matcher values. |
packages/oauth/__tests__/implicitFlow.test.ts |
Types nullable flow responses. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| */ | ||
|
|
||
| import junoConfigs from "@cloudoperators/juno-config/eslint/juno-typescript.mjs" | ||
| import junoConfigs from "@cloudoperators/juno-config/eslint/vite-react-ts.mjs" |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR enables strict TypeScript ESLint rules for the
@cloudoperators/juno-oauthpackage by removing all disabled unsafe type rules and fixing the resulting type safety issues. This builds on the foundation from PR #2021 which added comprehensive TypeScript types to the package.Changes Made
ESLint Configuration (
eslint.config.mjs):@cloudoperators/juno-config/eslint/vite-react-ts.mjsconfig@typescript-eslint/no-unsafe-assignment@typescript-eslint/no-unsafe-call@typescript-eslint/no-unsafe-argument@typescript-eslint/no-unsafe-member-accessSource Files - Added proper type assertions:
oidcConfig.ts: Castr.json()response toOidcConfigoidcState.ts: Fixed CommonJS import type handling, removed@ts-ignorecodeFlow.ts: Cast JSON responses toTokenResponseoidcSession.ts: Cast parsed JSON toRecord<string, unknown>Test Files - Added proper type annotations:
mockedSession.test.ts: Cast vitest matchers tounknownoidcSession.test.ts: Use exportedOidcSessionInstancetypetokenSession.test.ts: Import and use proper types (TokenSessionInstance,TokenSessionState)implicitFlow.test.ts: ImportFlowResponsetype and handle nullable responseRelated Issues
Testing Instructions
pnpm icd packages/oauthpnpm lint- Should pass without errorspnpm typecheck- Should pass without errorspnpm test- All 86 tests should passpnpm build- Should build successfullyChecklist
PR Manifesto
Review the PR Manifesto for best practises.