@annangela/eslint-plugin-prefer-reflect

2.2.2 • Public • Published

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

Package Sidebar

Install

npm i @annangela/eslint-plugin-prefer-reflect

Weekly Downloads

42

Version

2.2.2

License

MIT

Unpacked Size

14 kB

Total Files

16

Last publish

Collaborators

  • annangela