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

Remove comment-empty-line-before and order/properties-order #520

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

iansan5653
Copy link
Contributor

From Slack:

  • comment-empty-line-before: Requires a blank line before every comment. Most often, comments are referring to a single line (the next line). By putting a blank line before the comment, it makes it look like the comment is talking about several lines / a chunk of lines. This is especially distracting when you start working with CSS nesting, where you already are grouping related things into blocks separated by newlines. In my experience, this rule tends to just discourage people from using comments at all, which isn't great.
  • order/properties-order: While on the surface I can understand the benefits of consistent property ordering, in practice the order is inconsistent and confusing. The rule only affects some properties, so others are unaffected and can be inserted in any place. This results in the autofixer shuffling properties around seemingly arbitrarily to satisfy the rule instead of grouping related properties together. In my experience, authors tend to be better at determining a good property order because they understand the intent behind what they are writing.

@iansan5653 iansan5653 requested a review from a team as a code owner November 6, 2024 18:43
@iansan5653 iansan5653 requested review from langermank and removed request for a team November 6, 2024 18:43
Copy link

changeset-bot bot commented Nov 6, 2024

🦋 Changeset detected

Latest commit: 00e136e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/stylelint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@iansan5653 iansan5653 changed the title Remove comment-empty-line-before and order/properties-order Remove comment-empty-line-before and order/properties-order Nov 6, 2024
@jonrohan jonrohan merged commit ad6fafd into main Nov 6, 2024
6 checks passed
@jonrohan jonrohan deleted the remove-order-empty-line branch November 6, 2024 18:48
@primer-css primer-css mentioned this pull request Nov 6, 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.

2 participants