0.0.2 • Published 1 year ago

@hetchet/eslint-plugin-sort-keys v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

npm downloads serenity

Description

Standard ESLint sort-keys rule doesn't allow sorting fields and there is no plan to implement it. However, personally I would find a lot of usages for such functionality, so I added fixing logic to default ESLint rule.

Installation

  1. Install ESLint: npm: npm i eslint --save-dev yarn: yarn add -D eslint

  2. Install plugin: npm: npm i @hetchet/eslint-plugin-sort-keys --save-dev yarn: yarn add -D @hetchet/eslint-plugin-sort-keys

  3. Add to your ESLint config:

{
	// ...
	"plugins": ["@hetchet/sort-keys"],
	"rules": {
		"@hetchet/sort-keys/sort-keys": "error"
	}
	// ...
}

Options

Plugin supports same options as original ESLint sort-keys rule.


❗️ Use this plugin at your own risk