Skip to content

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

@bmish

Description

@bmish

Received feedback that the two leading emojis in this example rule doc configs notice could be confusing (jsx-eslint/eslint-plugin-react#3499 (comment)).

Proposal 1

We could move the emojis next to their respective sentences to keep this as a consolidated notice.

Pros:

  • Keep to a single line for minimizing vertical space needed
  • More consistent with our other consolidated fixableAndHasSuggestions notice

Cons:

  • The notice's leading emoji doesn't fully represent the contents of the line anymore

Proposal 2

We could split these into separate notices/lines, similar to how we separated the rule list configs column into multiple columns based on severity.

Pros:

  • Maximize clarity
  • Maximize aesthetics
  • Avoids attempting to convey multiple distinct pieces of information in a single line

Cons:

  • Uses additional vertical space
  • Does not give the user the option to choose whether they want the severities consolidated into one line or split into multiple lines

Proposal 3

Split configs notice into configsError,configsWarn,configsOff, same as how we did for the configs column, so the user can control exactly where these notices go.

Pros:

  • Same benefits as Proposal 2
  • Allows us to keep the configs notice type for people who want to consolidate all the severities into a single line, while having separate notice types for those who want to use separate lines (similar to fixableAndHasSuggestions vs fixable and hasSuggestions)

Cons:

  • Same benefits as Proposal 2
  • More added complexity having to manage these notices separately instead of all together
  • If we want to change the default behavior of this, it would require a breaking change
  • Possibly overkill for now and we can switch to this later if there's a need

(current)

💼🚫 This rule is enabled in the ☑️ recommended config. This rule is disabled in the jsx-runtime config.


(Proposal 1: consolidated with emojis next to corresponding sentence)

💼 This rule is enabled in the ☑️ recommended config. 🚫 This rule is disabled in the jsx-runtime config.


(Proposal 2/3: separate lines)

💼 This rule is enabled in the ☑️ recommended config.

🚫 This rule is disabled in the jsx-runtime config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions