eslint-plugin-sorting
Advanced tools
Comparing version 0.2.0 to 0.2.1
"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: [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6545
133
7
2
0
1