Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.8 KB

File metadata and controls

67 lines (44 loc) · 1.8 KB

@raycast/prefer-title-case

📝 Prefer Title Case.

⚠️ This rule warns in the ✅ recommended config.

🔧 This rule is automatically fixable by the --fix CLI option.

Actions in Raycast's action panel should follow the Title Case naming convention for consistency reasons.

Rule Details

This rule checks your titles in the different <Action> components as well as <ActionPanel.Submenu>.

Examples of incorrect code for this rule:

<Action title="Submit form" />
<ActionPanel.Submenu title="Submit form" />
<Action title={isAssignedToMe ? "Assign to me" : "unassign from me"} />
<Action title={`Submit form to ${service}`} />

Examples of correct code for this rule:

<Action title="Submit Form" />
<ActionPanel.Submenu title="Submit Form" />
<Action title={isAssignedToMe ? "Assign to Me" : "Unassign from Me"} />
<Action title={`Submit Form to ${service}`} />

Note that since ESLint is a statistical analysis tool, it's not possible to cover every edge case possible, especially dynamic ones. For example, it's hard to check the title if you pass it from a prop:

<Action title={props.item.title} />

Options

Name Description Type
extraFixedCaseWords List of additional words to keep in fixed case (e.g. macOS, iPhone). String[]