Skip to content

Commit

Permalink
refactor(no-imperative-action): use imported predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaffers committed Apr 20, 2021
1 parent 64ca7ee commit 7efb3a3
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/rules/no-imperative-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@

const getDocsUrl = require('../utils/getDocsUrl')

function isActionCreator(name) {
return [
'assign',
'send',
'sendParent',
'forwardTo',
'respond',
'raise',
'log',
'choose',
'pure',
'escalate',
].includes(name)
}

function isActionCreatorCall(node) {
return node.type === 'CallExpression' && isActionCreator(node.callee.name)
}
const { isActionCreatorCall } = require('../utils/predicates')

function isPureActionCall(node) {
return node.type === 'CallExpression' && node.callee.name === 'pure'
Expand Down

0 comments on commit 7efb3a3

Please sign in to comment.