1.0.4 ā€¢ Published 27 days ago

@arabasta/eslint-plugin-redux-use-app-functions v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

@arabasta/eslint-plugin-redux-use-app-functions

NPM Version NPM License

ESLint plugin that enforces the usage of redux app specific functions.

Installation

Assuming you already have ESLint installed, run:

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

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

# pnpm
pnpm add --save-dev @arabasta/eslint-plugin-redux-use-app-functions

Usage

Flat config (eslint.config.js)

// ...
import reduxUseAppFunctions from '@arabasta/eslint-plugin-redux-use-app-functions';

export default [
  // ...
  reduxUseAppFunctions.configs.recommended,
];

Legacy config (.eslintrc)

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

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.4

27 days ago

1.0.3

27 days ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago