Skip to content

TheRealSyler/eslint-plugin-react-hmr-export-checker

Repository files navigation

eslint-plugin-react-hmr-export-checker

npmV githubLastCommit npmDM

Only export react components or typescript functions/variables.

WARNING i made this rule because my hmr was broken, i probably have not thought about all possible scenarios so it might not work correctly.

WARNING default export with other exports are not allowed/supported because im to lazy to implement it.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-react-hmr-export-checker:

npm install eslint-plugin-react-hmr-export-checker --save-dev

Usage

Add react-hmr-export-checker to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "react-hmr-export-checker"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "react-hmr-export-checker/rule-name": 2
    }
}

Supported Rules

  • Fill in provided rules here

  • only-export-react-components

Copyright (c) 2022 Leonard Grosoli Licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published