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

eslint-plugin-sort-imports-requires

Package Overview
Dependencies
Maintainers
13
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sort-imports-requires - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md
rebuild
# Changelog
## [1.0.2](https://github.com/uphold/eslint-plugin-sort-imports-requires/releases/tag/v1.0.2) (2022-02-25)
- Change sorting of declarations without name to be stable [\#3](https://github.com/uphold/eslint-plugin-sort-imports-requires/pull/3) ([satazor](https://github.com/satazor))
# Changelog
## [1.0.1](https://github.com/uphold/eslint-plugin-sort-imports-requires/releases/tag/v1.0.1) (2022-02-24)

@@ -5,0 +9,0 @@ - Fix bugs in edge case scenarios [\#2](https://github.com/uphold/eslint-plugin-sort-imports-requires/pull/2) ([satazor](https://github.com/satazor))

@@ -114,2 +114,7 @@ const once = require('once');

// Case in which names are equal (e.g.: both are null).
if (nameA === nameB) {
return 0;
}
return nameA > nameB ? 1 : -1;

@@ -116,0 +121,0 @@ });

2

package.json
{
"name": "eslint-plugin-sort-imports-requires",
"version": "1.0.1",
"version": "1.0.2",
"description": "An ESLint plugin to sort both import and require declarations in a unified manner.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -157,2 +157,25 @@ const rule = require('../lib').rules['sort-requires'];

},
// Special case in which unassigned requires shouldn't have their order changed after autofixing.
{
code: `
require('a');
require('b');
require('c');
const b = require('foo');
const a = require('foo');
`,
errors: [
{ message: "Expected require declaration of 'a' to be placed before 'b'.", type: 'VariableDeclaration' }
],
options: [{ unsafeAutofix: true }],
output: `
require('a');
require('b');
require('c');
const a = require('foo');
const b = require('foo');
`
},
// Declaration sort - `ignoreCase` option.

@@ -159,0 +182,0 @@ {

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