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

whitespace rule is confusing--can I enforce "no space?" #1588

Closed
giladgray opened this issue Sep 30, 2016 · 3 comments
Closed

whitespace rule is confusing--can I enforce "no space?" #1588

giladgray opened this issue Sep 30, 2016 · 3 comments

Comments

@giladgray
Copy link

giladgray commented Sep 30, 2016

the whitespace rule accepts up to 7 flags. is it possible to express the following desire?

  • one of the flags is "true," as in i want whitespace in that case
  • another flag is "false," as in i want to validate that there is no whitespace in that case

(i suspect not...)

stylelint makes this really easy by defining each case as its own rule (often as two -space-before and -space-after rules, see function-comma-* here). perhaps its worth considering breaking this rule into many smaller ones for each piece of the puzzle:

// require whitespace after
"whitespace-branch": [true, "after"],
// require no whitespace (but rule is enabled)
"whitespace-type": [true],
@JoshuaKGoldberg
Copy link
Contributor

@giladgray coming back to this: what would you propose we do here? Is the whitespace rule now configurable enough?

@JoshuaKGoldberg
Copy link
Contributor

Also relevant: discussions in #628 and linked issues.

@JoshuaKGoldberg
Copy link
Contributor

Formatting rule issue without discussion for several months? Time to close 😄

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

2 participants