0.0.15 • Published 1 year ago

eslint-plugin-react-soc v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npm npm GitHub Workflow Status (with branch) NPM

eslint-plugin-react-soc

An eslint plugin that ensures separation of business logic from presentation logic in React functional components.

Installation

You'll first need to install ESLint:

# npm
npm i eslint --save-dev

# yarn
yarn add eslint --dev

Next, install eslint-plugin-react-soc:

#npm
npm install eslint-plugin-react-soc --save-dev

#yarn
yarn add eslint-plugin-react-soc --dev

Usage

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

{
  "plugins": ["react-soc"]
}

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

{
  "rules": {
    "react-soc/separation-of-concerns": "error"
  }
}

Rules

Name                  Description
separation-of-concernsrule to warn mixing of business logic with presentation logic