Docs/Presets/React Native

React Native

Mobile-specific rules and best practices for React Native projects.

Enabled Rules

RuleSeverityDescription
quality/naming-conventionsblockPascalCase components, use-prefixed hooks
quality/no-deprecated-apiblockCatches deprecated React Native APIs
quality/anti-patternswarnInline styles in performance-sensitive components
quality/hallucination-guardwarnVerifies React Native imports exist
security/secret-detectionblockDetects API keys hardcoded in mobile app code

Usage

import { defineConfig } from '@solanticai/vguard';

export default defineConfig({
  presets: ['react-native'],
});

What it enforces

  • No deprecated APIs — Blocks usage of deprecated React Native components (ListView, Navigator, ToolbarAndroid) and recommends modern alternatives.
  • Naming conventions — Screen components must be PascalCase with Screen suffix (HomeScreen, not home). Hooks must use use prefix.
  • Performance patterns — Warns on inline style objects in FlatList renderItem and other performance-sensitive contexts. Use StyleSheet.create.
  • Import verification — AI tools frequently hallucinate React Native imports. This rule verifies that imported components and hooks actually exist in the installed version.
  • No hardcoded secrets — Mobile apps are easily decompiled. Blocks API keys, Firebase configs, and tokens written directly in source files.