Skip to content

Conversation

@tylerbutler
Copy link
Member

The unused variable eslint rule was not enabled in build-tools and the tsconfig noUnusedLocals option was disabled (by design), so unused variables were not caught before merge.

This change updates the lint config in build-tools to catch these issues in lint and makes the necessary changes to the source.

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Apr 7, 2025
@tylerbutler tylerbutler marked this pull request as ready for review April 7, 2025 22:17
@tylerbutler tylerbutler requested a review from a team April 7, 2025 22:18
alexvy86
alexvy86 previously approved these changes Apr 7, 2025
/**
* A transformer function that does nothing.
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious why do this here instead of the underscore prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't figure out why, but the lint rule gets tripped even when disabled in the config. I ended up just removing the placeholder args completely.

import detectIndent from "detect-indent";
// Imports are written this way for CJS/ESM compat
import fsePkg from "fs-extra";
// eslint-disable-next-line import/no-named-as-default-member -- Imports are written this way for CJS/ESM compat
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these just warnings and we're being good citizens and documenting them? Can't be that enabling the other rule somehow made this one start complaining, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, they're just warnings, but I noticed that there was a comment already so I converted it to a disable with the explanation.

Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

Looks good from my end

@tylerbutler tylerbutler enabled auto-merge (squash) April 8, 2025 18:39
@tylerbutler tylerbutler merged commit b25d4c1 into microsoft:main Apr 8, 2025
28 checks passed
@tylerbutler tylerbutler deleted the bt-lint-config branch April 8, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build related issues base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants