Skip to content

Commit

Permalink
remove AST selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
byteme980 committed Apr 10, 2018
1 parent 9be016f commit 115b6fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rules/dynamic-import-chunkname.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ module.exports = {
const commentRegex = new RegExp(commentFormat)

return {
[`CallExpression[callee.type="Import"],CallExpression[callee.name]`](node) {
const { callee: { name }} = node
if (name && importFunctions.indexOf(name) < 0) {
CallExpression(node) {
if (node.callee.type !== 'Import' && importFunctions.indexOf(node.callee.name) < 0) {
return
}

Expand Down

0 comments on commit 115b6fb

Please sign in to comment.