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

ESLint: Add rule to prevent usage of the word 'sidebar' in translatable strings #68894

Merged
merged 9 commits into from
Feb 12, 2025
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ const restrictedSyntax = [
'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/^toggle\\b/i]',
message: "Avoid using the verb 'Toggle' in translatable strings",
},
{
selector:
'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/sidebar\\b/i]',
message:
"Avoid using the word 'sidebar' in translatable strings. Consider using 'panel' instead.",
},
];

/** `no-restricted-syntax` rules for components. */
Expand Down
Loading