Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Yoda rule is not available despite docs #351

Open
antonyoneill opened this issue Aug 30, 2018 · 1 comment
Open

Yoda rule is not available despite docs #351

antonyoneill opened this issue Aug 30, 2018 · 1 comment

Comments

@antonyoneill
Copy link

The original eslint yoda rule both allows and disallows yoda conditionals.

Recently @jayandcatchfire updated the doc (#348) to state that the rule is provided natively by TSLint's binary-expression-operand-order, however this rule can only disallow yoda - it's not configurable.

I'd like to have a go at implementing a TSLint rule (not sure where to start, but worth a go) - we use yoda in PHP so I'd like to enforce it in TS. But can you advise whether I should create a new rule here, named yoda, or whether I should submit a PR to palantir extending the binary-expression-operand-order?

Cheers

@jmlopez-rod
Copy link
Collaborator

I would ask the guys at palantir if they would be willing to add that functionality (or if they accept a PR to add it). If they say no then ter-yoda is welcomed in this project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants