🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

eslint-plugin-sort-react-dependency-arrays

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sort-react-dependency-arrays

ESLint plugin to alphabetically sort React hook dependency arrays

0.0.1
npm
Version published
Weekly downloads
2.6K
-4.41%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-sort-react-dependency-arrays

ESLint plugin to enforce alphabetically sorted React hook dependency arrays.

Works with --fix.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-sort-react-dependency-arrays:

npm install eslint-plugin-sort-react-dependency-arrays --save-dev

Usage

Add sort-react-dependency-arrays to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "sort-react-dependency-arrays"
    ]
}

Then configure the rule under the rules section.

{
    "rules": {
        "sort-react-dependency-arrays/sort-react-dependency-arrays": 2
    }
}

Keywords

eslint

FAQs

Package last updated on 04 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts