šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

eslint-plugin-sort-export-all

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sort-export-all

ESLint rule that helps sort export *

1.0.2
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
Ā 
Created
Source

eslint-plugin-sort-export-all

ESLint rule that sorts exports * with autofix enabled

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-sort-export-all:

$ npm install eslint-plugin-sort-export-all --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-sort-export-all globally.

Usage

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

{
  "plugins": ["sort-export-all"]
}

Then add sort-export-all rule under the rules section.

{
  "rules": {
    "sort-export-all/sort-export-all": "warn"
  }
}

Often it makes sense to enable sort-export-all only for certain files/directories. For cases like that, use override key of eslint config:

{
  "rules": {
    // ...
  },
  "overrides": [
    {
      "files": ["src/alphabetical.js", "bin/*.js", "lib/*.js"],
      "rules": {
        "sort-export-all/sort-export-all": "warn"
      }
    }
  ]
}

Rule configuration

For available config options, see official sort-keys reference. All options supported by sort-keys, besides minKeys, are supported by sort-export-all.

Keywords

eslint

FAQs

Package last updated on 08 Jul 2020

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