Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-sort

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sort

Auto-fixable sort rules for ESLint.

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-34.09%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-plugin-sort

Build status npm semantic-release

Auto-fixable sort rules for ESLint.

Installation

npm

npm install -D eslint-plugin-sort

Yarn

yarn add -D eslint-plugin-sort

pnpm

pnpm add -D eslint-plugin-sort

bun

bun add -d eslint-plugin-sort

Usage

After installing, add sort to your list of ESLint plugins and extend the recommended configuration. This will enable all available rules as warnings.

Flat config (eslint.config.js)

import sort from "eslint-plugin-sort"

export default [
  sort.configs["flat/recommended"],
  {
    rules: {
      // Customize rules...
    },
  },
]

Legacy config (.eslintrc)

{
  "extends": "plugin:sort/recommended",
  "plugins": ["sort"]
}

List of Supported Rules

✔: Enabled in the recommended configuration.
🔧: Fixable with eslint --fix.

🔧RuleDescription
🔧sort/destructuring-propertiesSorts object destructuring properties
🔧sort/exportsSorts exports
🔧sort/export-membersSorts export members
🔧sort/importsSorts imports
🔧sort/import-membersSorts import members
🔧sort/object-propertiesSorts object properties
🔧sort/type-propertiesSorts TypeScript type properties
🔧sort/string-enumsSorts TypeScript string enums
🔧sort/string-unionsSorts TypeScript string unions

Keywords

FAQs

Package last updated on 23 Oct 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc