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

Add rule to enforce whitespaces in multiline variables #13

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

xpaczka
Copy link
Contributor

@xpaczka xpaczka commented Jun 26, 2024

What has been done

This PR introduces a rule that will enforce multline variables to have a whitespace before and after their declaration. The goal of this rule is to improve code readability by adding some breathing space to variables

Before

const x = 0
const y = 1
const object = {
  a: 'some-value'
  b: 'some-value'
}
const z = 2

After

const x = 0
const y = 1

const object = {
  a: 'some-value'
  b: 'some-value'
}

const z = 2

@xpaczka xpaczka requested a review from nkuba June 26, 2024 09:44
@xpaczka xpaczka self-assigned this Jun 26, 2024
@mhluongo mhluongo requested a review from Shadowfiend March 9, 2025 16:46
@mhluongo
Copy link
Member

mhluongo commented Mar 9, 2025

I'm a fan, WDYT @Shadowfiend?

@Shadowfiend
Copy link
Contributor

Shadowfiend commented Mar 10, 2025

No. See the introduction of the approach.

This issue was actually at the root of the discussion, I think. Will go ahead and close the PR.

@Shadowfiend
Copy link
Contributor

Ohp just kidding, this was indeed the trigger but it was decided the other way and we never merged this top level PR.

@Shadowfiend Shadowfiend reopened this Mar 10, 2025
@Shadowfiend Shadowfiend merged commit 3b7128d into main Mar 10, 2025
2 checks passed
@Shadowfiend Shadowfiend deleted the whitespace-enforce branch March 10, 2025 00:12
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.

3 participants