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

Split configs rule doc notice into separate lines by severity #311

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bmish
Copy link
Owner

@bmish bmish commented Nov 29, 2022

Split onto separate lines for clarity. A rule that is enabled/disabled/warn by multiple configs is a relatively uncommon situation to begin with.

Fixes #310.

Before:

💼🚫 This rule is enabled in the ✅ recommended config. This rule is disabled in the other config.

After:

⚠️ This rule warns in the ✅ recommended config.

🚫 This rule is disabled in the ⌨️ typescript config.

@bmish bmish added the bug Something isn't working label Nov 29, 2022
@@ -151,9 +140,9 @@ const RULE_NOTICES: {
),
]
.filter(Boolean)
.join(' ');
.join('\n\n');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why two newlines instead of one?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently separate all notices with a blank line:

💼 This rule is enabled in the ✅ recommended config.

🚫 This rule is disabled in the other config.

Are you suggesting grouping these related notices together like:

💼 This rule is enabled in the ✅ recommended config.
🚫 This rule is disabled in the other config.

Copy link

@ljharb ljharb Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly

@bmish bmish marked this pull request as draft December 1, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tweak emoji placement in rule doc config notice when combination of enabled/warn/disabled present
3 participants