@hero-design/eslint-plugin

9.0.0 • Public • Published

@hero-design/eslint-plugin

Hero Design's eslint plugin to ensure correct usage and deprecation of our packages. We strongly recommend all of our consumers to use this plugin with our predefined recommendedRn config.

Installation

You'll first need to install ESLint:

yarn add -D eslint

Next, install @hero-design/eslint-plugin:

yarn add -D @hero-design/eslint-plugin

Usage

Add @hero-design to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin postfix:

{
  "plugins": ["@hero-design"]
}

Then, you can either:

  1. Use our pre-defined config by adding plugin:@hero-design/recommendedRn under extends section. This approach is strongly recommended as it requires no configurations.
{
  "extends": ["plugin:@hero-design/recommendedRn"]
}
  1. Configure the rules you want to use under the rules section. This approach should be avoided in most of the cases unless you have any specific needs.
{
  "rules": {
    "@hero-design/rule-name": 2
  }
}

Supported Rules

Rule Description
@hero-design/no-deprecated-component-prop Disallow deprecated component props
@hero-design/no-deprecated-component-prop-value Disallow deprecated component prop's values
@hero-design/no-deprecated-theme-key Disallow deprecated theme keys
@hero-design/not-recommended-import Disallow not recommended imports

Package Sidebar

Install

npm i @hero-design/eslint-plugin

Weekly Downloads

760

Version

9.0.0

License

ISC

Unpacked Size

40.3 kB

Total Files

19

Last publish

Collaborators

  • haudao-eh
  • ttkien_eh
  • ehrocks-dev