coffeelint-alphabetize-keys
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -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 |
5373
29