Skip to content

AmitDigga/eslint-plugin-restrict-jsx-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

eslint-plugin-restrict-jsx-elements

Installation

yarn add eslint-plugin-restrict-jsx-elements -D

Get Started

To add this plugin and restricted elements, you have to modify .eslintrc

{
  ...,
  "plugins": [
    ...,
    "restrict-jsx-elements"
  ],
  "rules": {
    "restrict-jsx-elements/elements": [
      "warn",
      {
        "restrict": {
          "Element1": true,
          "Element2": {
            "message": "Please dont use element2, use Element3 instead"
          }
        }
      }
    ]
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published