@inficen/eslint-plugin-no-fc
v1.0.5
Published
prefer not using React.VFC or React.FC to type react components
Downloads
10
Readme
@inficen/eslint-plugin-no-fc ·
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @inficen/eslint-plugin-no-fc
:
npm install @inficen/eslint-plugin-no-fc --save-dev
Usage
Add @inficen/no-fc
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@inficen/no-fc"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@inficen/no-fc/no-fc": "warn"
}
}
If you haven't already, you will need to setup ESLint to work with typescript using typescript-eslint.
npm install --save-dev @typescript-eslint/parser
A minimal configuration would look as follows
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "@inficen/no-fc"],
"rules": {
"@inficen/no-fc/no-fc": "warn"
}
}