-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Enable @react-native/platform-colors
rule
#275
Conversation
rules: { | ||
'@react-native/platform-colors': WARNING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we turn on all recommended rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@react-native
plugin is exported only one rule )
PlatformColor(); // required at least one argument | ||
// eslint-disable-next-line @react-native/platform-colors | ||
PlatformColor([], {}); // arguments must be string literals | ||
// eslint-disable-next-line @react-native/platform-colors | ||
DynamicColorIOS('red'); // required object as first argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh looks like TS should take care of these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course TS will catch it early
but it still useful for JS projects
Co-authored-by: Michał Pierzchała <[email protected]>
Published in v14.2.0. Next time please use "squash and merge" instead of just merging, it helps me keep the commit history tidy. |
Summary
@react-native/platform-colors
ruleTest plan
see:
test/PlatformColor.js