Skip to content

Commit

Permalink
fix(rules): path to ast-utils is changed on eslint 5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza authored Aug 6, 2018
1 parent f83a4b9 commit 909b7af
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/rules/array-callback-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
* @author Alexander Afanasyev (based on Toru Nagashima's work)
*/

var astUtils = require('eslint/lib/ast-utils')
var astUtils;

try {
astUtils = require('eslint/lib/util/ast-utils')
}
catch(err) {
astUtils = require('eslint/lib/ast-utils')
}

var isElementArrayFinder = require('../is-element-array-finder')

var TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/
Expand Down

0 comments on commit 909b7af

Please sign in to comment.