@neylj001/eslint-plugin-custom
v1.0.3
Published
This ESLint plugin provides a custom rule to enforce the use of a `Text` component in place of standard HTML text elements like `<div>`, `<p>`, `<span>`, etc., especially useful in projects utilizing a design system or specific component libraries.
Downloads
9
Readme
eslint-plugin-custom
This ESLint plugin provides a custom rule to enforce the use of a Text
component in place of standard HTML text elements like <div>
, <p>
, <span>
, etc., especially useful in projects utilizing a design system or specific component libraries.
Installation
First, install the plugin:
npm install @neylj001/eslint-plugin-custom --save-dev
Usage
Add @neylj001/eslint-plugin-custom
to the plugins section of your ESLint configuration. Then configure the rules you want to use under the rules section.
{
"plugins": ["@neylj001/eslint-plugin-custom"],
"rules": {
"@neylj001/eslint-plugin-custom/use-text-component": "warn"
}
}
Rules
use-text-component
: Enforces the use of theText
component for text rendering.