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

[new rule]: ternary-operator-spacing #4109

Closed
wants to merge 1 commit into from

Conversation

arhontmw
Copy link

PR checklist

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

Overview of change:

New rule, which determines whether a space is required before and/or after question and colon tokens in ternary conditional operator

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @arhontmw! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@johnwiseheart
Copy link
Contributor

Hey @arhontmw, is there an issue where this change is discussed? Currently most (if not all) of whitespace linting is done by the whitespace rule and it would be good to have a discussion about the pros and cons of separating that rule into several more specific rules. If there is not an issue, feel free to create one.

@arhontmw
Copy link
Author

Added issue #4122

@JoshuaKGoldberg
Copy link
Contributor

Per discussion in #4122, and more broadly the upcoming deprecation of TSLint (#4534), closing this issue for housekeeping. @arhontmw you can always publish this rule in a standalone npm package if you'd like to see it used!

@JoshuaKGoldberg JoshuaKGoldberg added Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Aged Away and removed Status: In Discussion labels Jun 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Formatting rule Relates to a rule which enforces code formatting and likely overlaps with prettier Resolution: Aged Away
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants