2.2.2 • Published 4 months ago

@annangela/eslint-plugin-prefer-reflect v2.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

eslint-plugin-prefer-reflect

Main propose:

  • Modern version of original prefer-reflect rules in eslint

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @annangela/eslint-plugin-prefer-reflect:

npm install @annangela/eslint-plugin-prefer-reflect --save-dev

Usage

eslint.config.js - flat config

Use the plugin:

import preferReflectPlugin from "@annangela/eslint-plugin-prefer-reflect";

// ...

export default {
    // ...
    plugins: {
        // ...
        "@annangela/prefer-reflect": preferReflectPlugin,
        // ...
    },
    rules: {
        // ...

        // @annangela/prefer-reflect
        "@annangela/prefer-reflect/prefer-reflect": "error",

        // ...
    },
};

.eslintrc (Deprecated)

Add @annangela/eslint-plugin-prefer-reflect to the plugins section of your .eslintrc configuration file:

{
    "plugins": [
        "@annangela/prefer-reflect"
    ]
}

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

{
    "rules": {
        "@annangela/prefer-reflect/prefer-reflect": "error"
    }
}

I know this repeated words looks stupid, but the eslint requires this format.

Supported Rules

2.2.1

4 months ago

2.2.0

4 months ago

2.2.2

4 months ago

2.1.2

4 months ago

2.1.3

4 months ago

2.1.0

7 months ago

2.0.1

1 year ago

2.0.0

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago