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

eslint-plugin-sorting

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sorting - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

lib/util/check-ignored-types.js

9

lib/rules/sort-object-props.js
"use strict";
var checkIgnoredTypes = require("../util/check-ignored-types");
/**

@@ -21,12 +23,9 @@ * @param {Property} prop ObjectExpression property.

node.properties.reduce(function(prev, current) {
if (opts.ignoreMethods && current.value.type === "FunctionExpression") {
if (checkIgnoredTypes(current, prev, opts)) {
return current;
}
if (current.type === "ExperimentalSpreadProperty" ||
prev.type === "ExperimentalSpreadProperty") {
return current;
}
var prevKey = getKey(prev);
var currentKey = getKey(current);
if (opts.ignoreCase && prev) {

@@ -33,0 +32,0 @@ prevKey = prevKey.toLowerCase();

{
"name": "eslint-plugin-sorting",
"version": "0.2.0",
"version": "0.2.1",
"description": "Sorting rules for eslint",

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

@@ -21,3 +21,5 @@ "use strict";

"var obj = { A: 'eggs', a: 'spam' }",
{ code: "var a = { a:'a' }; var b = {a:1, ...a, b:2}", "parser": "babel-eslint", rules: {strict: 0} }
{ code: "var a = { a:'a' }; var b = {a:1, ...a, b:2}", "parser": "babel-eslint", rules: {strict: 0} },
{ code: "var a = { [a()]: 'a' }", "parser": "babel-eslint", rules: {strict: 0} },
{ code: "var a = { [a?b:c]: d }", "parser": "babel-eslint", rules: {strict: 0} }
],

@@ -24,0 +26,0 @@ invalid: [

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