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

[Eslint]: Wrong detection for no-unused-vars rule #27

Closed
Anonymxtrix opened this issue Mar 22, 2021 · 1 comment · Fixed by #30
Closed

[Eslint]: Wrong detection for no-unused-vars rule #27

Anonymxtrix opened this issue Mar 22, 2021 · 1 comment · Fixed by #30
Assignees
Labels
Bug [Category]

Comments

@Anonymxtrix
Copy link
Contributor

Expected Behavior

function initCurveBuffer(gl: any, func: (t: number) => Point, num: number) { ... }

In the function above, if func is used in the function, eslint should not be highlighting any errors.

Current Behavior

Eslint saying that t is defined but never used, although func is used somewhere in the function.

Failure Information

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Open your favourite editor. (ie. VSCode)
  2. Write the following function in any .ts file under src directory.
function initCurveBuffer(gl: any, func: (t: number) => Point, num: number) {
  const num = 0;
  for (let i = 0; i <= num; i += 1) {
    const point = func(i / num);
  }
}
  1. Enjoy the erroneous (and irritating) eslint errors!

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Version used: a58c40a
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): macOS Catalina version 10.15.7

Failure Logs

N/A

@Anonymxtrix
Copy link
Contributor Author

Look here for possible solution. It seems like we configured eslint airbnb wrongly since we used airbnb instead of airbnb-typescript stated here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug [Category]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants