correctness/useReactNativePlatformComponents
correctness · since 2.4.13
No autofixRecommended
biome.json
{
"linter": {
"rules": {
"correctness": {
"useReactNativePlatformComponents": "error"
}
}
}
}Ensure that platform-specific React Native components are only imported in files named for that platform.
import { ProgressBarAndroid } from "react-native";import { ActivityIndicatorIOS } from "react-native";import { View } from "react-native";Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/useReactNativePlatformComponents
correctness · since 2.4.13
{
"linter": {
"rules": {
"correctness": {
"useReactNativePlatformComponents": "error"
}
}
}
}Require functions with the "use server" directive to be async.
Require PlatformColor() and DynamicColorIOS() calls to use values written directly in the call.
Disallow unserializable expressions in Qwik dollar ($) scopes.
Disallow number literal object member names which are not base 10 or use underscore as separator.
Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
Require createEventDispatcher calls to declare the types of their events.