Skip to content

Conversation

Trott
Copy link
Member

@Trott Trott commented Feb 11, 2022

Instead of disabling the no-unused-expressions ESLint rule, mark
intentional "useless" expressions with void.

Refs: https://eslint.org/docs/rules/no-unused-expressions#options

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Feb 11, 2022
Instead of disabling the `no-unused-expressions` ESLint rule, mark
intentional "useless" expressions with `void`.

Refs: https://eslint.org/docs/rules/no-unused-expressions#options
@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 11, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 11, 2022
@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented Feb 11, 2022

The .out files of the message tests have to be updated.

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

(I don't think this improves code quality and I think it introduces a pretty rarely used language feature to help with an eslint rule)

@Trott
Copy link
Member Author

Trott commented Feb 11, 2022

(I don't think this improves code quality and I think it introduces a pretty rarely used language feature to help with an eslint rule)

I think you're right. I want to believe there's something more semantic about void foo.bar; instead of foo.bar; but explicit is better than implicit, and explicit would be a comment and not void.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants