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

fix(eslint-plugin): Skip missing 'rest' tuple type arguments in no-misused-promises #5809

Merged

Commits on Oct 11, 2022

  1. fix(eslint-plugin): Skip missing 'rest' tuple type arguments in no-mi…

    …sused-promises
    
    Fixes typescript-eslint#5807
    
    When linting a function with a 'rest' tuple argument, we might
    have different numbers of arguments between signatures:
    
    ```
    function foo(...args: []);
    function foo(...args: [string]);
    ```
    
    This PR makes no-misused-promises handle this code correctly,
    by ensuring that we only check an argument when we have a corresponding
    type parameter in the tuple type arguments.
    Aaron1011 committed Oct 11, 2022
    Copy the full SHA
    be2552e View commit details
    Browse the repository at this point in the history