Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused arguments on various function calls #2766

Merged
merged 1 commit into from Mar 4, 2021

Commits on Mar 4, 2021

  1. Remove unused arguments on various function calls

    I checked cli's code with Typescript using the tsconfig below. The
    compiler found a few arguments that are not used, so I removed them. In
    the case of `npm whoami`, it is clearer that it ignores its `args`
    and instead relies on `npm.flatOptions`.
    
    ```json
    {
        "compilerOptions": {
            "moduleResolution": "node",
            "module": "commonjs",
            "resolveJsonModule": true,
            "target": "es2019",
            "noImplicitAny": false,
            "noImplicitThis": true,
            "strict": true,
            "maxNodeModuleJsDepth": 0,
            "noEmit": true,
            "allowJs": true,
            "checkJs": true,
            "types": ["node"],
            "lib": ["esnext"]
        },
        "include": ["lib"]
    }
    ```
    
    PR-URL: npm#2766
    Credit: @sandersn
    Close: npm#2766
    Reviewed-by: @nlf, @ruyadorno, @Matausi29
    sandersn authored and ruyadorno committed Mar 4, 2021
    Copy the full SHA
    b33c760 View commit details
    Browse the repository at this point in the history