šŸš€ 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
0
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

1.0.0
latest
npm
Version published
Weekly downloads
2.2K
-24.38%
Maintainers
0
Weekly downloads
Ā 
Created
Source

eslint-plugin-sort-react-dependency-arrays

ESLint plugin to enforce alphanumerically 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 enable the rule under the rules section.

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

Keywords

eslint

FAQs

Package last updated on 17 Jul 2024

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