Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
refactor: use includes
  • Loading branch information
jamesgeorge007 committed Dec 26, 2019
commit dbf46b4e0ba777c14dcfb37a9df6093e1b595bb9
6 changes: 3 additions & 3 deletions lib/rules/order-in-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ function isNotSideEffectsNode (node, visitorKeys) {
node.type !== 'Property' &&
node.type !== 'ObjectExpression' &&
node.type !== 'ArrayExpression' &&
(node.type !== 'UnaryExpression' || ['!', '~', '+', '-', 'typeof'].indexOf(node.operator) < 0) &&
(node.type !== 'BinaryExpression' || ALL_BINARY_OPERATORS.indexOf(node.operator) < 0) &&
(node.type !== 'LogicalExpression' || LOGICAL_OPERATORS.indexOf(node.operator) < 0) &&
(node.type !== 'UnaryExpression' || !['!', '~', '+', '-', 'typeof'].includes(node.operator)) &&
(node.type !== 'BinaryExpression' || !ALL_BINARY_OPERATORS.includes(node.operator)) &&
(node.type !== 'LogicalExpression' || !LOGICAL_OPERATORS.indexOf(node.operator)) &&
node.type !== 'MemberExpression' &&
node.type !== 'ConditionalExpression' &&
// es2015
Expand Down