Socket
Socket
Sign inDemoInstall

eslint-config-react-native

Package Overview
Dependencies
283
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-react-native

Pluggable ESLint config for React Native that you can import, extend and override


Version published
Weekly downloads
18K
increased by7.55%
Maintainers
1
Install size
27.0 MB
Created
Weekly downloads
 

Readme

Source

Pluggable ESLint config for React Native that you can import, extend and override

Join the chat at https://gitter.im/kunalgolani/eslint-config npm version npm downloads GitHub issues Deps Dev Deps

React Native: Safety Checks and Best Practices with a bias toward code concision / brevity

Usage

In your js project directory:

npm install --save-dev eslint-config-react-native

And in your .eslintrc.yaml:

extends:
  - react-native

Alternatively, in your .eslintrc.js or .eslintrc.json:

{
  "extends": ["react-native"]
}

To add a git-hook to your commits, consider using husky

npm install --save-dev husky

And in your package.json:

  "scripts": {
    "precommit": "eslint ."
  }

Config

This config is biased and opinionated, and errs on the side of too many rules instead of too few. Think of this as a superset of your repo's lint config, and discard what you don't like in it. It's easy to override and disable the rules you find inconvenient.

env:
  browser: true

enables browser features and global variables

plugins:
  - react
  - react-native

provides React, JSX and React Native specific rules

extends:
  - esnext
  - plugin:react/recommended

enables jsx parsing, includes config and rules from eslint-config-esnext and the following react-specific recommended rules:

rules:

selected from here, configured to:


React Native Style Guide

Keywords

FAQs

Last updated on 29 May 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc