eslint-plugin-prop-has-no-shadow-declaration

1.1.0 • Public • Published

eslint-plugin-prop-has-no-shadow-declaration

This plugin prevents to name React component props with the same name as shadow functions or variables

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-prop-has-no-shadow-declaration:

$ npm install eslint-plugin-prop-has-no-shadow-declaration --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-prop-has-no-shadow-declaration globally.

Usage

Add prop-has-no-shadow-declaration to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "prop-has-no-shadow-declaration"
    ]
}

Then add the following to your rules section.

{
    "rules": {
        "prop-has-no-shadow-declaration/rule": 1
    }
}

Supported Rules

  • Fill in provided rules here

Package Sidebar

Install

npm i eslint-plugin-prop-has-no-shadow-declaration

Weekly Downloads

32

Version

1.1.0

License

ISC

Last publish

Collaborators

  • tknysh