eslint-plugin-react-directives

3.0.0 • Public • Published

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

Recommended

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:

Package Sidebar

Install

npm i eslint-plugin-react-directives

Weekly Downloads

68

Version

3.0.0

License

MIT

Unpacked Size

8.69 kB

Total Files

6

Last publish

Collaborators

  • peakchen90