New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coffeelint-alphabetize-keys

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffeelint-alphabetize-keys - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

12

lib/index.js

@@ -32,11 +32,11 @@ // Generated by CoffeeScript 1.10.0

AlphabetizeKeys.prototype._lintClass = function(node, astApi) {
var classKeys, expressions, instanceKeys, privateKeys;
var classKeys, instanceKeys, privateKeys;
classKeys = [];
instanceKeys = [];
privateKeys = [];
expressions = node.body.expressions.filter(function(e) {
return astApi.getNodeName(e.base) === 'Obj';
});
expressions.forEach((function(_this) {
node.body.expressions.forEach((function(_this) {
return function(expression) {
if (astApi.getNodeName(expression.base) !== 'Obj') {
return;
}
return expression.base.properties.forEach(function(property) {

@@ -50,3 +50,3 @@ var key, keyNode;

return privateKeys.push(key);
} else {
} else if (key !== 'constructor') {
return instanceKeys.push(key);

@@ -53,0 +53,0 @@ }

{
"name": "coffeelint-alphabetize-keys",
"version": "1.0.0",
"version": "1.0.1",
"description": "Coffeelint rule that verifies object keys are in alphabetical order",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

# coffeelint-alphabetize-keys
[![NPM Version](https://img.shields.io/npm/v/coffeelint-alphabetize-keys.svg)](https://www.npmjs.com/package/coffeelint-alphabetize-keys)
[![Build Status](https://img.shields.io/circleci/project/charlierudolph/coffeelint-alphabetize-keys/master.svg)](https://circleci.com/gh/charlierudolph/coffeelint-alphabetize-keys/tree/master)
Coffeelint rule requiring objects to have keys in alphabetical order
## Examples

@@ -4,0 +9,0 @@ ```coffee

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