Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-native

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-native

React Native specific linting rules for ESLint

  • 4.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
increased by7.1%
Maintainers
1
Weekly downloads
 
Created

What is eslint-plugin-react-native?

eslint-plugin-react-native is an ESLint plugin that provides specific linting rules for React Native projects. It helps developers maintain code quality and consistency by enforcing best practices and catching common errors specific to React Native development.

What are eslint-plugin-react-native's main functionalities?

No Unused Styles

This rule helps to identify and remove unused styles in your React Native components, ensuring that your stylesheets are clean and maintainable.

module.exports = {
  "rules": {
    "react-native/no-unused-styles": "error"
  }
};

No Inline Styles

This rule discourages the use of inline styles in React Native components, promoting the use of StyleSheet objects for better performance and readability.

module.exports = {
  "rules": {
    "react-native/no-inline-styles": "error"
  }
};

No Raw Text

This rule prevents the use of raw text outside of Text components, ensuring that all text is properly styled and localized.

module.exports = {
  "rules": {
    "react-native/no-raw-text": ["error", { "skip": ["CustomText"] }]
  }
};

Split Platform Components

This rule enforces the use of platform-specific file extensions (e.g., .ios.js, .android.js) for components that have different implementations for iOS and Android.

module.exports = {
  "rules": {
    "react-native/split-platform-components": "error"
  }
};

Other packages similar to eslint-plugin-react-native

Keywords

FAQs

Package last updated on 08 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc