eslint-plugin-custom-display-name

0.3.0 • Public • Published

eslint-plugin-custom-display-name

release License: MIT npm version

Eslint plugin that provides custom rules about displayName for React components.

Install

$ npm install --save-dev eslint-plugin-custom-display-name

and add it to your .eslintrc.

{
  "plugins": ["custom-display-name"],
  "rules": {
    "custom-display-name/display-name-only-exported-component": "error",
    "custom-display-name/prefer-unique-display-name": "error"
  }
}

Rules

Rule ID Description
custom-display-name/display-name-only-exported-component Exported Component requires displayName.
custom-display-name/prefer-unique-display-name displayName should be different from component's variable name.

Contributing

Welcome your contribution!

See also ESLint/Working with Plugins.

Setup

$ git clone git@github.com:nissy-dev/eslint-plugin-custom-display-name.git
$ cd eslint-plugin-custom-display-name
$ npm ci

Development Tools

// run tsc, eslint, prettier
$ npm run lint

// run test
$ npm run test

Readme

Keywords

Package Sidebar

Install

npm i eslint-plugin-custom-display-name

Weekly Downloads

2

Version

0.3.0

License

MIT

Unpacked Size

21.4 kB

Total Files

8

Last publish

Collaborators

  • nissy-dev