Skip to content

Conflict in parens rules around binary assignment #386

@gilbertbw

Description

@gilbertbw

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions