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

Extend whitespace linting functionality #4122

Closed
arhontmw opened this issue Aug 17, 2018 · 8 comments
Closed

Extend whitespace linting functionality #4122

arhontmw opened this issue Aug 17, 2018 · 8 comments

Comments

@arhontmw
Copy link

Rule Suggestion

Extends the functionality proposed in #1588.
The amendments listed below make whitespace rules more customizable

Is your rule for a general problem or is it specific to your development style?
The proposal introduces changes to whitespace rule and adds several new rules in order to solve the general problem of whitespace linting.

What does your suggested rule do?
My suggestion:

List several examples where your rule could be used
The rules suggested are appropriate for the situations when someone's coding style is not supported by the current version of tslint. E.g. the current version does not check the following:

  • Space before colon in property/desctructuring assignment
  • No space before question token in ternary operator
  • No space after branching keywords (for, if, which, ...)
@johnwiseheart
Copy link
Contributor

I think the primary discussion here is whether these things should be integrated into whitespace or not. My feeling is that the whitespace rule deals with almost all (if not all) whitespace issues and we should keep it that way, but I could also see an argument for splitting the rule into multiple. Thoughts @giladgray @suchanlee

@giladgray
Copy link

i would prefer to minimize the number of rules by making individual ones smarter. if the whitespace rule can handle everything (without being too unwieldy) then we should do that.

@arhontmw
Copy link
Author

So what: we need to revisit the whole whitespace rule in order to implement the proposed amendments?

@arhontmw
Copy link
Author

@johnwiseheart @giladgray ?

@johnwiseheart
Copy link
Contributor

I mean, in a way yeah. I wouldn't say we have to revisit the whole thing, just that it makes more sense for them to be added to the whitespace rule than to just be tacked on as separate new rules.

@JoshuaKGoldberg
Copy link
Contributor

Also relevant: discussions in #628 and linked issues.

@JoshuaKGoldberg
Copy link
Contributor

💀 It's time! 💀

TSLint is being deprecated and no longer accepting pull requests for major new changes or features. See #4534. 😱

If you'd like to see this change implemented, you have two choices:

  • Recommended: Check if this is available in ESLint + typescript-eslint
  • Not Recommended: Fork TSLint locally 🤷‍♂️

👋 It was a pleasure open sourcing with you!

If you believe this message was posted here in error, please comment so we can re-open the issue!

@JoshuaKGoldberg
Copy link
Contributor

🤖 Beep boop! 👉 TSLint is deprecated 👈 (#4534) and you should switch to typescript-eslint! 🤖

🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋

@palantir palantir locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants