Skip to content

eslint plugin that ensures separation of business logic from presentation logic in React function components

License

Notifications You must be signed in to change notification settings

dbaishya/eslint-plugin-react-SoC

Repository files navigation

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-concerns rule to warn mixing of business logic with presentation logic

About

eslint plugin that ensures separation of business logic from presentation logic in React function components

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •