Skip to content

Commit

Permalink
Merge pull request #45 from lo1tuma/replace-lodash-with-ramda
Browse files Browse the repository at this point in the history
Replace lodash with ramda
  • Loading branch information
lo1tuma committed Nov 6, 2015
2 parents 070db74 + f8384fd commit 36c0eb5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/rules/handle-done-callback.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var _ = require('lodash');
var R = require('ramda');

module.exports = function (context) {
var possibleAsyncFunctionNames = [
Expand Down Expand Up @@ -38,9 +38,9 @@ module.exports = function (context) {
}

function findParamInScope(paramName, scope) {
return _.find(scope.variables, function (variable) {
return R.find(function (variable) {
return variable.name === paramName && variable.defs[0].type === 'Parameter';
});
}, scope.variables);
}

function isReferenceHandled(reference) {
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/no-synchronous-tests.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var _ = require('lodash');
var R = require('ramda');

module.exports = function (context) {
var possibleAsyncFunctionNames = [
Expand Down Expand Up @@ -38,9 +38,9 @@ module.exports = function (context) {
}

function findPromiseReturnStatement(nodes) {
return _.find(nodes, function (node) {
return R.find(function (node) {
return node.type === 'ReturnStatement' && node.argument && node.argument.type !== 'Literal';
});
}, nodes);
}

function checkPromiseReturn(functionExpression) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"changelog": "pr-log"
},
"dependencies": {
"lodash": "^3.9.3"
"ramda": "^0.18.0"
},
"devDependencies": {
"chai": "3.2.0",
Expand Down

0 comments on commit 36c0eb5

Please sign in to comment.