1.0.3 • Published 1 year ago

@stoyan-eslint/eslint-plugin-redux-use-app-functions v1.0.3

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

eslint-plugin-redux-use-app-functions

This ESLint plugin enforces the usage of the app specific functions.

Installation

Assuming you already have ESLint installed, run:

# npm
npm install @stoyan-eslint/eslint-plugin-redux-use-app-functions --save-dev

# yarn
yarn add @stoyan-eslint/eslint-plugin-redux-use-app-functions --dev

Then extend the recommended eslint config:

{
  "extends": [
    // ...
    "plugin:@stoyan-eslint/redux-use-app-functions/recommended"
  ]
}

Rules

āœ… Set in the recommended configuration\ šŸ”§ Automatically fixable by the --fix CLI option

RuleDescriptionāœ…šŸ”§
use-app-selectorEnforces the usage of useAppSelectorāœ…šŸ”§
use-app-dispatchEnforces the usage of useAppDispatchāœ…šŸ”§
use-create-app-async-thunkEnforces the usage of createAppAsyncThunkāœ…šŸ”§

use-app-selector

Examples of incorrect code for this rule:

useSelector();

Examples of correct code for this rule:

useAppSelector();

use-app-dispatch

Examples of incorrect code for this rule:

useDispatch();

Examples of correct code for this rule:

useAppDispatch();

use-create-app-async-thunk

Examples of incorrect code for this rule:

createAsyncThunk();

Examples of correct code for this rule:

createAppAsyncThunk();

License

MIT

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago