AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
570 stars 152 forks source link

Unused Variable in `react-oidc/src/User.ts` #1346

Closed tobiashochguertel closed 2 months ago

tobiashochguertel commented 2 months ago

Issue and Steps to Reproduce

I can't compile my project, atm. because there is an unused variable in react-oidc module.

Problem:

node_modules/@axa-fr/react-oidc/src/User.ts:39:71 - error TS6133: 'data' is declared but its value is never read.

39         const newSubscriptionId = oidc.subscribeEvents((name: string, data: any) => {
                                                                         ~~~~

tsconfig.json

{
    "compilerOptions": {
        "target": "ES2020",
        "useDefineForClassFields": true,
        "lib": [
            "ES2020",
            "DOM",
            "DOM.Iterable"
        ],
        "module": "ESNext",
        "skipLibCheck": true,
        "moduleResolution": "bundler",
        "allowImportingTsExtensions": true,
        "resolveJsonModule": true,
        "isolatedModules": true,
        "noEmit": true,
        "jsx": "react-jsx",
        "allowJs": true,
        "strict": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noFallthroughCasesInSwitch": true
    },
    "include": [
        "src"
    ],
    "exclude": [
        "node_modules",
        "dist",
        ".uxpin-merge"
    ],
    "references": [
        {
            "path": "./tsconfig.node.json"
        }
    ]
}

Versions:

        "@axa-fr/oidc-client": "^7.22.0-alpha.1404",
        "@axa-fr/react-oidc": "^7.19.6",
guillaume-chervet commented 2 months ago

Thank you @tobiashochguertel , version v7.22.2 just fixed this.

tobiashochguertel commented 2 months ago

@guillaume-chervet Thanks for fixing it :)