Skip to content

Add no-unused-expressions lint#10831

Open
jtran wants to merge 10 commits intomainfrom
jtran-unused-exprs-lint
Open

Add no-unused-expressions lint#10831
jtran wants to merge 10 commits intomainfrom
jtran-unused-exprs-lint

Conversation

@jtran
Copy link
Copy Markdown
Contributor

@jtran jtran commented Apr 4, 2026

This removes dead code and makes it clearer to readers what should be returned from functions. It should prevent one-line functions from accidentally not returning what they returned before when getting refactored to multi-line.

@jtran jtran requested a review from a team as a code owner April 4, 2026 18:01
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Apr 10, 2026 2:17am

Request Review

This removes dead code and makes it clearer to readers what should be returned from functions, especially inline ones. It should also prevent one-line functions from accidentally not returning what they returned before when getting refactored to multi-line.
@jtran jtran force-pushed the jtran-unused-exprs-lint branch from 8809a74 to f5765e3 Compare April 4, 2026 18:16
@jtran jtran marked this pull request as ready for review April 4, 2026 18:35
@jtran jtran marked this pull request as ready for review April 6, 2026 04:15
selectionType: 'singleCodeCursor',
},
}) &&
setHasClearedSelection(true)
Copy link
Copy Markdown
Contributor Author

@jtran jtran Apr 6, 2026

Choose a reason for hiding this comment

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

According to the lint, this line was dead code. When I made it always run, lots of tests failed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pierremtb, what do you think about this change. Looks like you added this in #7106.

Copy link
Copy Markdown
Contributor

@jacebrowning jacebrowning left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtran
Copy link
Copy Markdown
Contributor Author

jtran commented Apr 7, 2026

This isn't a priority to merge. I'd like to get a real review since I don't want to break anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants