Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Add 'binary-expression-operand-order' rule #2805

Merged
merged 4 commits into from
May 30, 2017
Merged

Conversation

andy-hanson
Copy link
Contributor

@andy-hanson andy-hanson commented May 21, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Adds the 'binary-expression-operand-order' rule, which forbids expressions like undefined == x.

CHANGELOG.md entry:

[new-rule] binary-expression-operand-order

case ts.SyntaxKind.GreaterThanGreaterThanToken:
case ts.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
case ts.SyntaxKind.AsteriskAsteriskToken:
case ts.SyntaxKind.InKeyword:
Copy link
Contributor

Choose a reason for hiding this comment

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

CommaToken

@adidahiya
Copy link
Contributor

I'm not a huge fan of "yoda". How about "binary-expression-operand-order"? As per #1371 and stylelint's conventions, I lean towards naming rules with the "thing the rule applies to" preceding the "thing the rule is checking".

@andy-hanson andy-hanson changed the title Add 'yoda' rule Add 'binary-expression-operand-order' rule May 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants