You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-react-directives

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-directives

some rules for babel-plugin-react-directives.

3.0.0
latest
Source
npmnpm
Version published
Weekly downloads
68
195.65%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-react-directives

Build Status node npm peer dependency version npm GitHub

some rules for babel-plugin-react-directives.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-react-directives:

$ npm install eslint-plugin-react-directives --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-react-directives globally.

Usage

There are two ways to configure it via .eslintrc:

{
  "plugins": [
    "react-directives"
  ],
  "rules": {
    "no-undef": "off",
    "react-directives/no-undef": "error"
  }
}

or use the recommended rules:

{
  "extends": [
    "plugin:react-directives/recommended"
  ],
  "rules": {
    "no-undef": "off"
  }
}

Settings

If you have configured some options in babel-plugin-react-directives, add settings section to .eslintrc file.

{
  "settings": {
    "react-directives": {
      "prefix": "x"
    }
  }
}

List of supported rules

Shareable configurations

This plugin exports a recommended configuration.

To enable this configuration use the extends property in your .eslintrc config file:

{
  "extends": [
    "plugin:react-directives/recommended"
  ]
}

The rules enabled in this configuration are:

Keywords

eslint

FAQs

Package last updated on 18 Mar 2022

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