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

Conflict in parens rules around binary assignment #386

Open
1 of 5 tasks
gilbertbw opened this issue Jun 16, 2023 · 0 comments
Open
1 of 5 tasks

Conflict in parens rules around binary assignment #386

gilbertbw opened this issue Jun 16, 2023 · 0 comments

Comments

@gilbertbw
Copy link

Overview

I think there is a conflict in the @shopify/binary-assignment-parens and @typescript-eslint/no-extra-parens rules.

I have some code like:

const running = (this.state === 'running');

Which is getting the following error:

error Unnecessary parentheses around expression @typescript-eslint/no-extra-parens

from

'@typescript-eslint/no-extra-parens': 'error',

But if I change it to:

const running = this.state === 'running';

I get

error You must include parentheses around a binary assignment expression @shopify/binary-assignment-parens

from

'@shopify/binary-assignment-parens': ['error', 'always'],

Consuming repo

What repo were you working in when this issue occurred?

A private repository

Labels

  • Add the Type: Bug label to this issue.

Area

  • Add any relevant Area: <area> labels to this issue

Scope

  • Is this issue related to a specific package?

    • Tag it with the Package: <package_name> label.

Checklist

  • Please delete the labels section before submitting your issue
  • I have described this issue in a way that is actionable (if possible)
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

No branches or pull requests

1 participant