Skip to content

Commit

Permalink
Applied zertosh#21
Browse files Browse the repository at this point in the history
  • Loading branch information
lexpank committed Jan 10, 2020
1 parent 96d7027 commit 79e1ae3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
15 changes: 13 additions & 2 deletions no-cycles.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,19 @@ var eslintModule = (function() {
throw new Error('Could not find eslint');
})();

var Traverser = eslintModule.require('./util/traverser');
var traverser = new Traverser();
function getTraverser() {
var traverser;
try {
traverser = eslintModule.require('./shared/traverser');
}
catch(e) {
traverser = eslintModule.require('./util/traverser');
}

return new traverser();
}

var traverser = getTraverser();

//------------------------------------------------------------------------------
// Utils
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-dependencies",
"version": "2.4.0",
"version": "2.4.1",
"description": "require/import dependency validation",
"keywords": [
"eslint",
Expand All @@ -14,8 +14,8 @@
"README.md",
"*.js"
],
"author": "Andres Suarez <zertosh@gmail.com>",
"repository": "zertosh/eslint-plugin-dependencies",
"author": "Andres Suarez <zertosh@gmail.com>, Alexander Pankiv <alexander.pankiv@goodylabs.com>",
"repository": "goodylabs/eslint-plugin-dependencies",
"scripts": {
"test": "find test -name '*-test.js' -print0 | xargs -n 1 -0 node"
},
Expand Down

0 comments on commit 79e1ae3

Please sign in to comment.