-
Notifications
You must be signed in to change notification settings - Fork 887
Extend whitespace linting functionality #4122
Comments
I think the primary discussion here is whether these things should be integrated into |
i would prefer to minimize the number of rules by making individual ones smarter. if the |
So what: we need to revisit the whole |
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. |
Also relevant: discussions in #628 and linked issues. |
💀 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:
👋 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! |
🤖 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! 👋 |
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:
whitespace
rule - instead use more consistenttypedef-whitespace
rule (see PR [bugfix][enhancement][rule-change] Get rid of check-type option inwhitespace
rule #4110)ternary-operator-spacing
that checks a presence or absence of whitespace-like symbols before and/or after question and colon tokens in ternary conditional expression (see PR [new rule]: ternary-operator-spacing #4109 )key-spacing
that determines whether a space is required before and/or after a colon in a property/destructuring assignment (see PR [new rule] Key spacing rule #4111)whitespace
rule and instead use the new rulespace-after-branch
(see PR [new rule] Space after branch #4112) that requires or restricts whitespace after branching keywordsList 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:
The text was updated successfully, but these errors were encountered: