Skip to content

Conversation

@retyui
Copy link
Contributor

@retyui retyui commented Jun 10, 2024

Summary

Test plan

see: test/PlatformColor.js

@retyui retyui requested a review from jaworek June 10, 2024 12:30
plugins: ['react-native'],
plugins: ['react-native', '@react-native'],
rules: {
'@react-native/platform-colors': WARNING,
Copy link
Member

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?

Copy link
Contributor Author

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 )

Comment on lines +5 to +9
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
Copy link
Member

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

Copy link
Contributor Author

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]>
@retyui retyui merged commit eaeb4a6 into main Jun 10, 2024
@retyui retyui deleted the platform-colors branch June 10, 2024 12:44
@thymikee
Copy link
Member

Published in v14.2.0. Next time please use "squash and merge" instead of just merging, it helps me keep the commit history tidy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants