Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds customGroup.newlinesBetweenrelated options #430

Closed
wants to merge 12 commits into from

Conversation

hugop95
Copy link
Contributor

@hugop95 hugop95 commented Dec 22, 2024

Misclick.

- We are going to be adding additional options in the next commit.
- We will be fixing them in a commit later.
…nodes

- The `leftNum < rightNum` check is currently only made if `numberOfEmptyLinesBetween === 0` (as confirmed by passing tests).
- With `newlinesBetween: always` and if `numberOfEmptyLinesBetween > 1`, we were not checking whether the two nodes were sorted or not before raising the spacing error.
- This would result in two errors toward the same two nodes:
  - One related to invalid order.
  - The other related to invalid spacing.
- A few tests had to be updated.
  - All of those errors targeted nodes that already had order errors reported for them.
…odes

- The `leftNum < rightNum` check is not made when `newlinesBetween: never` either (as confirmed by passing tests).
- A few tests had to be updated:
  - The fix itself has no change. There are only slightly less reported newlines errors.
  - All of those errors targeted nodes that already had order errors reported for them.
- Renames constants.
- Simplifies `for` loop.
- Creates constants.
@hugop95 hugop95 closed this Dec 22, 2024
@hugop95 hugop95 changed the title TODO feat: adds customGroup.newlinesBetweenrelated options Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant