eslint-plugin-immer-reducer

0.1.1 • Public • Published

eslint-plugin-immer-reducer

This plugin is made to complement the immer-reducer package.

To use it:

yarn add -D eslint-plugin-immer-reducer

Then, edit your .eslintrc.js file and add in 'plugin:immer-reducer/recommended' into your extends section:

// example .eslintrc.js file
 
module.exports = {
  env: {
    node: true,
    browser: true
  },
  parser: "@typescript-eslint/parser",
  extends: [
    "plugin:react/recommended",
    "plugin:@typescript-eslint/recommended",
 
    // this plugin
    "plugin:immer-reducer/recommended"
  ]
};

What does this do?

The recommended config enables the one rule this plugin currently has: immer-reducer/no-optional-or-default-value-params.

This rule disallows having optional parameters or parameters with default values in immer-reducer extended classes. See the warning in the main immer-reducer repo for why this is necessary.

Screenshots

Screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-immer-reducer

Weekly Downloads

286

Version

0.1.1

License

ISC

Unpacked Size

3.64 kB

Total Files

3

Last publish

Collaborators

  • stekoshy