This open source library is developed to improve the developer's experience. 😆
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
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"]
}
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. |
We welcome contribution from everyone in the community. Read below for detailed contribution guide.