Skip to content

po4tion/eslint-plugin-component

Repository files navigation

eslint-plugin-component

This open source library is developed to improve the developer's experience. 😆

Installation

You'll first need to install ESLint:

npm i -D eslint
#OR
yarn add -D eslint
#OR
pnpm add -D eslint

Next, install eslint-plugin-component:

npm install -D eslint-plugin-component
#OR
yarn add -D eslint-plugin-component
#OR
pnpm add -D eslint-plugin-component

Usage

This plugin only works in the components folder path.

Add component to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["component"]
}

Rules

Rule Description
component/jsx-pascal-in-component Change the first letter of the component to uppercase if it is lowercase.
component/number-easy-read Enforce number literals for readability.
component/constants Enforce capital letters in constant variable names.

Contributing

We welcome contribution from everyone in the community. Read below for detailed contribution guide.

CONTRIBUTING