Skip to content

ESLint Config Migration: Allow unused vars with leading underscores#1045

Merged
filmaj merged 1 commit intotslint-to-eslintfrom
no-unused-vars
Aug 23, 2021
Merged

ESLint Config Migration: Allow unused vars with leading underscores#1045
filmaj merged 1 commit intotslint-to-eslintfrom
no-unused-vars

Conversation

@filmaj
Copy link
Copy Markdown
Contributor

@filmaj filmaj commented Aug 6, 2021

Summary

This is a PR that should be merged into #1024 and incrementally addresses #842.

This PR turns extends the @typescript-eslint/no-unused-vars rule (for reference: base ESLint no-unused-vars rule).

Leading underscores are allowed for variable and argument names and is intended to signify "ignore this variable."

Impact

Before

✖ 362 problems (173 errors, 189 warnings)
  76 errors and 0 warnings potentially fixable with the `--fix` option.

After

✖ 340 problems (151 errors, 189 warnings)
  76 errors and 0 warnings potentially fixable with the `--fix` option.

Requirements (place an x in each [ ])

@filmaj filmaj added the tests M-T: Testing work only label Aug 6, 2021
@filmaj filmaj self-assigned this Aug 6, 2021
Copy link
Copy Markdown
Contributor

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@filmaj filmaj merged commit 9e63844 into tslint-to-eslint Aug 23, 2021
@filmaj filmaj deleted the no-unused-vars branch August 23, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests M-T: Testing work only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants