You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
For me at least, I still want no-magic-numbers to catch this case. Yes you know what the number represents, but by forcing you to define the number outside of the JSX, it could enable you to better define how you came up with the number, allow easy exporting, etc.
That said, I could see this as a new rule option - to disable the rule within JSX. However, I would disagree with setting it as default.
I appended option ts.SyntaxKind.JsxAttribute and ts.SyntaxKind.JsxAttributes to Rule.ALLOWED_NODES,but nothing changed. Would you please add this enhancement yourself?
Rule Suggestion
Is your rule for a general problem or is it specific to your development style?
A general problem.
What does your suggested rule do?
no-magic-numbers
should not report error when using in tsx attribute.List several examples where your rule could be used
Because we both understand what the numbers mean.
Additional context
No.
The text was updated successfully, but these errors were encountered: